Improve logging for watchdog pinsg

This commit is contained in:
Pieter-Jan Briers
2024-04-05 02:22:06 +02:00
parent 84360c653d
commit b31940b489

View File

@@ -157,11 +157,13 @@ namespace Robust.Server.ServerStatus
try
{
// Passing null as content works so...
_sawmill.Debug("Sending ping to watchdog...");
await _httpClient.PostAsync(new Uri(_baseUri, $"server_api/{_watchdogKey}/ping"), null!);
_sawmill.Debug("Succeeded in sending ping to watchdog");
}
catch (HttpRequestException e)
{
_sawmill.Warning("Failed to send ping to watchdog:\n{0}", e);
_sawmill.Error("Failed to send ping to watchdog:\n{0}", e);
}
}