Comments (2)
Hello!
If I understood correctly, you'd like to output an error while a bar is running?
If so, there are several ways to achieve this.
- Output error message below a bar, when there is an error. BarNewLineExtend option is your friend here, refer to example.
- Display an error in place of some decorator, in that case you need to implement custom decorator.
I used this approach here.
from mpb.
Hi vbauerster!
Thanks for the answer
Actually I'm thinking now and do something like this https://stackoverflow.com/questions/19965795/go-golang-write-log-to-file at the same time that we show the bars.
In my case it would be a mixture of your approach with this approach of writing Logs to a file.
I have not started anything yet, still probing and also starting with Go Language.
PS. The big problem is that when I use go run main.go | & tee -a bartest.txt
I get a gigantic and ugly Log. This is not what you want in a log file.
Cheers.
from mpb.
Related Issues (20)
- Please make progress.shutdown public HOT 3
- Too many bars = bars repeated? HOT 1
- Display text instead of progress bar HOT 4
- Is there a way to dispose (remove) all the bars after process completed so it doesn't stay in console? HOT 1
- Add support for ReadSeeker for uploads to s3 HOT 5
- Memory leak HOT 5
- Please expose ProxyWriter to public API by analogy with Proxy reader HOT 1
- Panic when calling bar.DecoratorEwmaUpdate inside goroutine HOT 2
- Any option to print logs below progress bar, without progress bar getting duplicated? HOT 3
- if not a TTY, mpb still output control characters HOT 2
- [bytes counter] when use EwmaSpeed ,speed and remain time calculate is wrong? HOT 4
- [QUESTION] Bar doesn't display right info.
- Bug: Bars are not completely removed HOT 3
- Leading white space not removable? HOT 2
- DynTotal with EWMA question HOT 1
- Adding color to one bar on abort adds colors to others in barExtenderRev example HOT 1
- Cannot show up progress bar at Goland terminal console HOT 1
- Ineffective breaks in heap_manager.go HOT 3
- Using Frogbot to scan this repository
- WithWaitGroup hangs on error. Help explain how to use WithWaitGroup. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpb.