Quantcast
Channel: Nicholas Blumhardt
Viewing all articles
Browse latest Browse all 102

A console sink with property colouring

$
0
0

The coloured console ‘appender’ is one of my favourites in log4net, so high on the list for inclusion in Serilog.

Smart property highlighting makes the result quite interesting:

ColoredConsoleSinkDemo

You can use it on the full .NET Framework using the out-of-the-box Serilog 0.2.8 package.

Log.Logger = new LoggerConfiguration()
    .WriteTo.ColoredConsole()
    .CreateLogger();

Simple at this stage, but fun! What do you think?


Viewing all articles
Browse latest Browse all 102

Trending Articles