Skip to content

Commit

Permalink
Debug on production be like
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr0maks committed Aug 11, 2023
1 parent 90156c3 commit 60162eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Content.Server/AruMoon/BansNotificationsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ private async void SendDiscordMessage(WebhookPayload payload)
var request = await _httpClient.PostAsync(_webhookUrl,
new StringContent(JsonSerializer.Serialize(payload), Encoding.UTF8, "application/json"));

_sawmill.Log(LogLevel.Debug, $"Discord webhook message: {JsonSerializer.Serialize(payload)}");

var content = await request.Content.ReadAsStringAsync();
if (!request.IsSuccessStatusCode)
{
_sawmill.Log(LogLevel.Error, $"Discord returned bad status code when posting message: {request.StatusCode}\nResponse: {content}");
// _sawmill.Log(LogLevel.Error, $"Discord returned bad status code when posting message: {request.StatusCode}\nResponse: {content}");
return;
}
}
Expand Down

0 comments on commit 60162eb

Please sign in to comment.