Comments (4)
I briefly investigated this to submit a PR to Serilog.Sinks.Console
to inject a custom TextWriter for standard out and error.
That could possibly work but the sink also actively changes Console.ForegroundColor
expecting the sink to write in real time.
That said you can now write persist message above the console using pbar.WriteLine()
and I've opened #59 so you can also write to standard error above the console. A custom sink link Serilog.Sinks.Console.ShellProgressBar
could work but it won't be able to reuse much of the infrastructure of Serilog.Sinks.Console
since most is private/internal.
Will leave this open as I think this project should also build a Serilog.Sinks.ShellProgressBar
to validate its design and interopability with logging frameworks. It won't be anywhere near as fully featured.
That said the progressbar pbar.WriteLine()
is only to persist and preserve important messages above the progress bar. It's inherently slow as it needs to buffer and flush in sync with the progressbar draw loop. So it would make a poor logger for anything with high volume logging.
from shellprogressbar.
I'm having the same issue with Microsoft's default logging extension, using the ILogger
from Microsoft.Extensions.Logging
.
The implementation currently contains multiple ProgressBar
, separated with _logger.LogInformation("msg");
from Microsoft.Extensions.Logging
. The logger lines are being immediately overwritten by the next ProgressBar
.
from shellprogressbar.
I've seen nodejs libs for pogressbar that allows console outut, just pogressbar renders on bottom of a screen
from shellprogressbar.
It's seems we can use _pbar. WriteLine but id don't display all lines correctly!
from shellprogressbar.
Related Issues (20)
- Misleading documentation of CollapseWhenFinished property
- ProgressBar.WriteLine does not work correctly on multiline writes or when lines are longer then ConsoleWidth HOT 3
- Progress Bar Blocks Cancel Request (CTRL+C)
- Zero String Allocations?
- Update child progress bar message
- Calc character width correct HOT 2
- CollapseWhenFinished except on error
- ProgressBar.WriteLine doesn't show recent messages HOT 4
- Some bars disappear as console scrolls HOT 3
- Support to Int64 values of newTickCount and maxTicks HOT 1
- Multiple bars broke view in parallel HOT 1
- async Task await breaks progress bar
- Output not updating until function end
- Tick(estimatedDuration, message) does not update EstimatedDuration
- Progress not staying on one line HOT 1
- Update NuGet package license as equal as GitHub MIT license HOT 1
- Can we have Spawn with IndeterminateProgressBar as a child would be good. HOT 1
- EstimatedDurationString "overflows" if EstimatedDuration exceeds 24 hours
- Exemple error
- [Feature] Spawn child progress as indeterminate progress bar
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 shellprogressbar.