fix(worker): filter EF Core/ASP.NET Core noise out of log ring buffer
EF Core logs every SQL statement at Information, which BroadcastLogSink buffers into LogRingBuffer regardless of level, flooding the Log Visualizer overlay and worker log file with SQL noise that buries hand-curated business events. Override both to Warning so real EF Core / ASP.NET Core problems still surface.
This commit is contained in:
@@ -47,6 +47,8 @@ var broadcastSink = new BroadcastLogSink(logBuffer);
|
|||||||
|
|
||||||
builder.Host.UseSerilog((ctx, lc) => lc
|
builder.Host.UseSerilog((ctx, lc) => lc
|
||||||
.MinimumLevel.Information()
|
.MinimumLevel.Information()
|
||||||
|
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", Serilog.Events.LogEventLevel.Warning)
|
||||||
|
.MinimumLevel.Override("Microsoft.AspNetCore", Serilog.Events.LogEventLevel.Warning)
|
||||||
.WriteTo.File(
|
.WriteTo.File(
|
||||||
System.IO.Path.Combine(logRoot, "worker-.log"),
|
System.IO.Path.Combine(logRoot, "worker-.log"),
|
||||||
rollingInterval: RollingInterval.Day,
|
rollingInterval: RollingInterval.Day,
|
||||||
|
|||||||
Reference in New Issue
Block a user