Skip to content

Commit

Permalink
refactor(Program.cs): comment out Serilog logger configuration and us…
Browse files Browse the repository at this point in the history
…age to troubleshoot logging issues
  • Loading branch information
Jossec101 committed Dec 4, 2023
1 parent 98897f3 commit ee8e5ab
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,15 @@ public static void Main(string[] args)

var jsonFormatter = new LowerCaseJsonFormatter();

Log.Logger = new LoggerConfiguration()
.ReadFrom.Configuration(builder.Configuration)
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
.MinimumLevel.Override("System", LogEventLevel.Warning)
.Enrich.With(new DatadogLogEnricher())
.WriteTo.Console(jsonFormatter)
.CreateLogger();

builder.Logging.ClearProviders();
builder.Host.UseSerilog();
// Log.Logger = new LoggerConfiguration()
// .ReadFrom.Configuration(builder.Configuration)
// .MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
// .MinimumLevel.Override("System", LogEventLevel.Warning)
// .Enrich.With(new DatadogLogEnricher())
// .WriteTo.Console(jsonFormatter)
// .CreateLogger();

//builder.Host.UseSerilog();

// Add services to the container.

Expand Down

0 comments on commit ee8e5ab

Please sign in to comment.