I'm trying to use a couple of enrichers (machine name and thread ID for now) in conjunction with a rolling file sink and a Loggly sink. Whilst the Loggly events correctly contain the machine name and thread ID properties, I can't see these in the rolling file events.
Here is my xml/code configuration:
<add key="serilog:minimum-level" value="Information" />
<add key="serilog:write-to:RollingFile.pathFormat" value="C:\Foo\bar-{Date}.txt" />
<add key="serilog:using" value="Serilog.Sinks.Loggly" />
<add key="serilog:write-to:Loggly.inputKey" value="redacted Loggly key" />
new LoggerConfiguration()
.ReadAppSettings()
.Enrich.WithMachineName()
.Enrich.WithThreadId()
.CreateLogger()
Did anyone manage to do this? Could this behaviour be by design or are these enrichers not supported for rolling file sinks?