Skip to content

Commit ac78f96

Browse files
committed
Slight reformatting of DefaultGetLevel
1 parent ed55d3d commit ac78f96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Serilog.AspNetCore/SerilogApplicationBuilderExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public static class SerilogApplicationBuilderExtensions
2828
const string DefaultRequestCompletionMessageTemplate =
2929
"HTTP {RequestMethod} {RequestPath} responded {StatusCode} in {Elapsed:0.0000} ms";
3030

31-
static readonly Func<HttpContext, double, Exception, LogEventLevel> DefaultGetLevel =
32-
(ctx, _, ex) => ex != null
31+
static LogEventLevel DefaultGetLevel(HttpContext ctx, double _, Exception ex) =>
32+
ex != null
3333
? LogEventLevel.Error
3434
: ctx.Response.StatusCode > 499
3535
? LogEventLevel.Error

0 commit comments

Comments
 (0)