serilog | aspnet-core | logging

Serilog - Console Sink Themes

Curious about how each theme in Serilog.Sinks.Console looks like? Check them here.

Abhith RajanJune 20, 2020 · 2 min read · Last Updated:

Serilog is my favorite logger. The sinks I was using are ApplicationInsights, File, and Seq (for local). I was not using Console sink but when we switched to docker, I thought it is nice to have Console too.

I was checking the colored output for Console and I realized that the serilog-sinks-coloredconsole is retired and the Serilog.Sinks.Console by default has the colored output. There were few color themes listed on the readme so I want to see how each looks like, and see it for yourself below.

Built-in Themes

SystemConsoleTheme.Literate (Default)

1.WriteTo.Console()

OR

1.WriteTo.Console(theme: SystemConsoleTheme.Literate)

SystemConsoleTheme.Literate
SystemConsoleTheme.Literate

ConsoleTheme.None

1.WriteTo.Console(theme: ConsoleTheme.None)

ConsoleTheme.None
ConsoleTheme.None

SystemConsoleTheme.Grayscale

1.WriteTo.Console(theme: SystemConsoleTheme.Grayscale)

SystemConsoleTheme.Grayscale
SystemConsoleTheme.Grayscale

AnsiConsoleTheme.Literate

1.WriteTo.Console(theme: AnsiConsoleTheme.Literate)

AnsiConsoleTheme.Literate
AnsiConsoleTheme.Literate

AnsiConsoleTheme.Grayscale

1.WriteTo.Console(theme: AnsiConsoleTheme.Grayscale)

AnsiConsoleTheme.Grayscale
AnsiConsoleTheme.Grayscale

AnsiConsoleTheme.Code

1.WriteTo.Console(theme: AnsiConsoleTheme.Code)

AnsiConsoleTheme.Code
AnsiConsoleTheme.Code

Final Notes

In the above list, my favorite so far is the default one. I didn’t try any custom themes yet. if you know any good looking custom themes, let me know in the comments 👇

Additional Resources

Written by Abhith Rajan
Abhith Rajan is an aspiring software engineer with more than 8 years of experience and proven successful track record of delivering technology-based products and services.
Buy me a coffee

Was this helpful?

👈 This is a live react editor.

This page is open source. Noticed a typo? Or something unclear?
Improve this page on GitHub

Related ArticlesView All

Related VideosView All

A Journey into .NET Microservices with Steeltoe

.NET Microservices with Steeltoe

Single Page Architectures with VueJS and ASP.NET Core - Kevin Griffin

Related StoriesView All

Related Tools & ServicesView All

flurl.dev

Flurl

Flurl is a modern, fluent, asynchronous, testable, portable, buzzword-laden URL builder and HTTP client library for .NET.