Skip to content

Commit 1689a4d

Browse files
committed
Fix: Corrected logging
1 parent b1eb5f8 commit 1689a4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CodeOfChaos.Extensions.AspNetCore/LoggingOverrideExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public static WebApplicationBuilder OverrideLoggingWithSerilog(
3737
builder.Logging.ClearProviders();
3838
builder.Logging.AddSerilog(Log.Logger);
3939
builder.Services.AddSingleton(Log.Logger);
40-
builder.Services.AddSingleton<IHostedService, ApplicationShutdownLoggerCleanup>();// Ensure cleanup
41-
builder.Services.AddLogging(loggingBuilder => loggingBuilder.AddSerilog(Log.Logger));
40+
builder.Services.AddHostedService<ApplicationShutdownLoggerCleanup>(); // Ensure cleanup
41+
// builder.Services.AddLogging(loggingBuilder => loggingBuilder.AddSerilog(Log.Logger));
4242

4343
return builder;
4444
}

0 commit comments

Comments
 (0)