Skip to content

Commit

Permalink
move request logs to verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
jackcaver committed Mar 7, 2024
1 parent 55d676d commit 9abc654
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ProjectEarthServerAPI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public static void Main(string[] args)
.MinimumLevel.Debug()
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.MinimumLevel.Override("Microsoft.AspNetCore", LogEventLevel.Warning)
.MinimumLevel.Override("ProjectEarthServerAPI.Authentication", LogEventLevel.Warning)
.CreateLogger();

Log.Logger = log;
Expand Down
2 changes: 1 addition & 1 deletion ProjectEarthServerAPI/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
options.MessageTemplate = "{RemoteIpAddress} {RequestMethod} {RequestScheme}://{RequestHost}{RequestPath}{RequestQuery} responded {StatusCode} in {Elapsed:0.0000} ms";

// Emit debug-level events instead of the defaults
options.GetLevel = (httpContext, elapsed, ex) => LogEventLevel.Debug;
options.GetLevel = (httpContext, elapsed, ex) => LogEventLevel.Verbose;

// Attach additional properties to the request completion event
options.EnrichDiagnosticContext = (diagnosticContext, httpContext) =>
Expand Down

0 comments on commit 9abc654

Please sign in to comment.