mthamil / AspNetCore.Serilog.RequestLoggingMiddleware

Middleware for ASP.NET Core that uses Serilog to log requests.
Apache License 2.0
8 stars 0 forks source link

I need a way to configure message template #5

Open lukasz-pekala opened 4 years ago

lukasz-pekala commented 4 years ago

Currently messagetemplate is hardcoded

private const string MessageTemplate = "HTTP {Method} to '{Path}' responded with {StatusCode} in {Elapsed:0.0000} ms";

Changing this would enable localization and more customization. For example, using {Elapsed:0.00} ms instead of {Elapsed:0.0000} ms would be useful as it's less noisy IMHO