The Semantic Logging Application Block (SLAB) from Microsoft's Patterns & Practices team is an alternative structured logger that can write to Seq.
Serilog or SLAB?
Serilog and SLAB each have their own strengths that may influence your decision to use one or the other. Serilog is a "schemaless" logger, which offers additional flexibility and requires fewer lines of code to use, while SLAB incorporates the schema-based approach from Windows' ETL infrastructure, and integrates strongly with it.
In your application that uses SLAB, install the Seq sink from NuGet:
At the Visual Studio Package Manager console, type:
PM> Install-Package Seq.Client.Slab
This will add the required assemblies to the project.
Now, use the
LogToSeq() method to configure an event listener:
The method accepts the URL of your Seq server, and additional parameters like the Seq API key.
That's it! When you write log events to your SLAB log:
They'll appear beautifully in Seq, complete with queryable properties from the payload and ETW.
Updated less than a minute ago