serilog-archive / serilog-sinks-literate Goto Github PK
View Code? Open in Web Editor NEWDeprecated: now a part of https://github.com/serilog/serilog-sinks-console
License: Apache License 2.0
Deprecated: now a part of https://github.com/serilog/serilog-sinks-console
License: Apache License 2.0
The projectUrl defined in https://github.com/serilog/serilog-sinks-literate/blob/dev/src/Serilog.Sinks.Literate/project.json#L7 is incorrect: "projectUrl": "https://github.com/serilog/serilog-sinks-seq"
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.
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.
Version 3.0.0 started escaping CRLF symbols effectively removing line breaks, which makes console output pretty useless.
Is it possible to configure escaping?
Could you update README.md with informmation wheter it's compatible and if not whether you plan to add it?
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.
WriteTo.LiterateConsole
in terms of WriteTo.Console
I mean no color at all... weird
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.
Current Console sink accepts level switch. However LiterateConsoles does not.
Hi,
Are there any plans to support LoggingLevelSwitch?
Unless I'm missing something, not passing restrictedToMinimumLevel will default to verbose.
Thanks in advance,
Jean
It can be useful for many automation reasons to direct Error and Fatal logs to standard error (Console.Error) or its redirection rather than to standard out.
The sink will render {Properties}
, but won't pretty-print it without additional work.
This is an opportunity to rewrite/break the dependency on OutputProperties
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.