Skip to content

Commit

Permalink
Merge pull request #107 from GeneriekPublicatiePlatformWoo/fix-reques…
Browse files Browse the repository at this point in the history
…t-logging

fix: request logging met serilog
  • Loading branch information
felixcicatt authored Nov 26, 2024
2 parents f96b89f + 5a001bf commit 8d88501
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ODPC.Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

using var logger = new LoggerConfiguration()
.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
.MinimumLevel.Override("Microsoft.AspNetCore.Authentication", LogEventLevel.Information) //logeventlevel information voor Microsoft.AspNetCore.Authentication namespace omdat deze namespace de unauthorizations gooit, voorbeeld: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler: Information: AuthenticationScheme: Bearer was challenged.
.MinimumLevel.Override("Microsoft.Hosting.Lifetime", LogEventLevel.Information)
.MinimumLevel.Override("Microsoft.AspNetCore.Mvc", LogEventLevel.Warning)
.MinimumLevel.Override("Microsoft.AspNetCore.Routing", LogEventLevel.Warning)
.MinimumLevel.Override("Microsoft.AspNetCore.Hosting", LogEventLevel.Warning)
.WriteTo.Console(new JsonFormatter())
.CreateLogger();

Expand Down Expand Up @@ -54,7 +54,7 @@ string GetRequiredConfig(string key)

var app = builder.Build();

app.UseSerilogRequestLogging();
app.UseSerilogRequestLogging(x=> x.Logger = logger);
app.UseDefaultFiles();
app.UseOdpcStaticFiles();
app.UseOdpcSecurityHeaders();
Expand Down

0 comments on commit 8d88501

Please sign in to comment.