diff --git a/ODPC.Server/Program.cs b/ODPC.Server/Program.cs index b017315..076d028 100644 --- a/ODPC.Server/Program.cs +++ b/ODPC.Server/Program.cs @@ -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(); @@ -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();