mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-15 02:00:09 +00:00
Slightly change HTTP log format
This commit is contained in:
parent
f2c18dff41
commit
ca4ffdb803
1 changed files with 4 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue