Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Configuring Serilog w/ AppSettings and Seq

1. Install Serilog.Extras.AppSettings

PM> Install-Package Serilog.Extras.AppSettings

2. Add the 'read' method to logger config

... = new LoggerConfiguration()
  .ReadAppSettings()
  ... // Other config

3. Add using/server URL keys

In x.config, add two (or more) app settings keys:

<appSettings>
  <add key="serilog:using" value="Serilog.Sinks.Seq" />
  <add key="serilog:write-to:Seq.serverUrl" value="http://my-seq:5341" />
</appSettings>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment