From 984791f193e26f806462a0231ad15323b8115d4a Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Mon, 10 Jun 2024 22:02:29 +0300 Subject: [PATCH] style: change template for log message --- Endpoint/Configuration/AppConfig/LoggerConfiguration.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Endpoint/Configuration/AppConfig/LoggerConfiguration.cs b/Endpoint/Configuration/AppConfig/LoggerConfiguration.cs index 06e9f53..a82010f 100644 --- a/Endpoint/Configuration/AppConfig/LoggerConfiguration.cs +++ b/Endpoint/Configuration/AppConfig/LoggerConfiguration.cs @@ -57,7 +57,7 @@ public static class LoggerConfiguration { app.UseSerilogRequestLogging(options => { - options.MessageTemplate = "Handled {RequestPath} in {Elapsed:0.0000} ms"; + options.MessageTemplate = "[{RequestMethod}] {RequestPath} [Client {RemoteIPAddress}] [{StatusCode}] in {Elapsed:0.0000} ms"; options.GetLevel = (_, elapsed, ex) => elapsed >= 2500 || ex != null ? LogEventLevel.Warning