Skip to content
This repository has been archived by the owner. It is now read-only.


Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Serilog.Sinks.Literate Build status NuGet Version Documentation Join the chat at

An alternative colored console sink for Serilog that uses a literate programming-inspired presentation to showcase the structure/type of event data. This is in contrast with the ColoredConsole sink that uses color predominantly to emphasise an event's level.


This package is being retired

The features of this sink have now been merged into the default Serilog console sink. We recommend using the console sink instead.

Getting started

Install the Serilog.Sinks.Literate package from NuGet:

Install-Package Serilog.Sinks.Literate

To configure the sink in C# code, call WriteTo.LiterateConsole() during logger configuration:

var log = new LoggerConfiguration()
Log.Information("This will be written to the literate console");

XML <appSettings> configuration

To use the literate console sink with the Serilog.Settings.AppSettings package, first install that package if you haven't already done so:

Install-Package Serilog.Settings.AppSettings

Instead of configuring the logger in code, call ReadFrom.AppSettings():

var log = new LoggerConfiguration()

In your application's App.config or Web.config file, specify the literate sink assembly and required path format under the <appSettings> node:

    <add key="serilog:using" value="Serilog.Sinks.Literate" />
    <add key="serilog:write-to:LiterateConsole" />

JSON appsettings.json configuration

To use the rolling file sink with Microsoft.Extensions.Configuration, for example with ASP.NET Core or .NET Core, use the Serilog.Settings.Configuration package. First install that package if you have not already done so:

Install-Package Serilog.Settings.Configuration

Instead of configuring the literate console directly in code, call ReadFrom.Configuration():

var configuration = new ConfigurationBuilder()

var logger = new LoggerConfiguration()

In your appsettings.json file, under the Serilog node, :

  "Serilog": {
    "WriteTo": [
      { "Name": "LiterateConsole" }

Copyright © 2016 Serilog Contributors - Provided under the Apache License, Version 2.0.