style: change template for log message
This commit is contained in:
parent
b640902777
commit
984791f193
@ -57,7 +57,7 @@ public static class LoggerConfiguration
|
|||||||
{
|
{
|
||||||
app.UseSerilogRequestLogging(options =>
|
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
|
options.GetLevel = (_, elapsed, ex) => elapsed >= 2500 || ex != null
|
||||||
? LogEventLevel.Warning
|
? LogEventLevel.Warning
|
||||||
|
Loading…
Reference in New Issue
Block a user