Slightly change HTTP log format
This commit is contained in:
parent
f2c18dff41
commit
ca4ffdb803
@ -66,11 +66,11 @@ namespace PluralKit.Bot
|
|||||||
|
|
||||||
var routePath = NormalizeRoutePath(response.RequestMessage.RequestUri.LocalPath.Replace("/api/v7", ""));
|
var routePath = NormalizeRoutePath(response.RequestMessage.RequestUri.LocalPath.Replace("/api/v7", ""));
|
||||||
var route = $"{response.RequestMessage.Method} {routePath}";
|
var route = $"{response.RequestMessage.Method} {routePath}";
|
||||||
LogContext.PushProperty("DiscordRoute", route);
|
LogContext.PushProperty("RequestUrlRoute", route);
|
||||||
|
|
||||||
_logger.Information(
|
_logger.Information(
|
||||||
"{RequestMethod} {RequestUrl} -> {ResponseStatusCode} {ResponseStatusString} (in {RequestDurationMs:F1} ms)",
|
"HTTP {RequestMethod} {RequestUrl} -> {ResponseStatusCode} {ResponseStatusString} (in {RequestDurationMs:F1} ms)",
|
||||||
response.RequestMessage.Method.Method,
|
response.RequestMessage.Method,
|
||||||
response.RequestMessage.RequestUri,
|
response.RequestMessage.RequestUri,
|
||||||
(int) response.StatusCode,
|
(int) response.StatusCode,
|
||||||
response.ReasonPhrase,
|
response.ReasonPhrase,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user