serilog-sinks-eventlog
serilog-sinks-eventlog copied to clipboard
Serilog Event Log don't work if source & logname are different
Hi,
I'm using Serilog and using windows event log sink if I keep logName and Source the same then it works[shown in below snapshot] and if I keep it different it doesn't work, I don't see any logs coming under Serilog, can someone help.
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
.Enrich.FromLogContext()
.WriteTo.EventLog("MyService", "Serilog") // Here different logName and Source
.CreateLogger();
Log.Information("Hello, Windows Event Log!");