Magnus Lindhe
Magnus Lindhe

Reputation: 7327

How can I use LibLog with a custom Serilog LoggerConfiguration?

The default provider for Serilog in LibLog is SerilogLogProvider. This provider will use the static entry point Serilog.Log to log entries.

How can I use a custom Serilog ILogger with LibLog? I could write a new log provider for LibLog but want to know if there are other options already available for me.

The reason for this is that I want to use different log configurations for my application and the library with LibLog support.

Upvotes: 2

Views: 980

Answers (1)

Magnus Lindhe
Magnus Lindhe

Reputation: 7327

My solution was to write a custom ILogProvider:

https://gist.github.com/mgnslndh/ab0c4309269198d2493f7a408b84a33c

Upvotes: 2

Related Questions