Giter Site home page Giter Site logo

Comments (4)

Mpdreamz avatar Mpdreamz commented on September 16, 2024 3

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.

jerone avatar jerone commented on September 16, 2024 3

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.

Mart-Bogdan avatar Mart-Bogdan commented on September 16, 2024

I've seen nodejs libs for pogressbar that allows console outut, just pogressbar renders on bottom of a screen

from shellprogressbar.

Mart-Bogdan avatar Mart-Bogdan commented on September 16, 2024

It's seems we can use _pbar. WriteLine but id don't display all lines correctly!

from shellprogressbar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.