Coder Social home page Coder Social logo

serilog-sinks-literate's People

Contributors

adamchester avatar dahlbyk avatar merbla avatar nblumhardt avatar optical avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

serilog-sinks-literate's Issues

Color palette poor under Linux on Docker on Windows - Theme Support?

Running the Docker on Windows beta; the dark gray brackets are not visible, blue Booleans and null are unreadable, and the overall color scheme is washed out and dull.

image

Since many terminals have different color capabilities or renderings, and just about every programmer has different theme preferences, why don't we add editor-style syntax highlighting themes here?

Switching to ANSI color codes is probably the way to go; it'd be nice to provide a 256-color palette since most terminals do or will support it.

Some examples of the kinds of things it'd be cool to support:

The default would probably remain as-is, and use the standard system console colors; color codes should only be written when writing to a terminal so that they don't show up in piped output.

Log.Logger = new LoggerConfiguration()
    .WriteTo.LiterateConsole(theme: LiterateConsoleTheme.VSCode)
    .CreateLogger();

LiterateConsoleTheme would be a user-constructable class; it may be necessary to make it abstract and provide concrete SystemLiterateConsoleTheme and AnsiLiterateConsoleTheme or similar.

Needs a more detailed design, but should be approachable.

DNXCore50 Compatible?

Could you update README.md with informmation wheter it's compatible and if not whether you plan to add it?

Wrap Serilog.Sinks.Console 3.0

The upcoming Serilog.Sinks.Console version 3.0 is a superset of this sink. We should direct visitors to it, and update this package to be a simple wrapper for the new one.

  • Implement WriteTo.LiterateConsole in terms of WriteTo.Console
  • Update README.md

Allow colour output to interop with other console writers

I often use this sink to get great readable console output during my unit tests. However, I also often have multiple test threads running at the same time. This causes the console output to be interleaved between the multiple threads, making it hard to read and understand what just happened. Sometimes the colours are in the wrong place... sometimes the text from one process is interleaved with text from the literate sink.

One common way to solve this issue is to simply allow the caller/user to provide an object which can be used as the lock. All console writers share this lock object instance and this ensures that a each log event is written to the console write as an atomic operation.

The downside of course is that each thread may end up getting blocked longer and more often, however at least now the console output makes sense, and the user explicitly decided to opt in to this anyway by providing the locks.

Support LoggingLevelSwitch?

Hi,

Are there any plans to support LoggingLevelSwitch?
Unless I'm missing something, not passing restrictedToMinimumLevel will default to verbose.

Thanks in advance,
Jean

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.