add trace() as DEBUG debug()

Replace DEBUG debug() with trace() everywhere
This commit is contained in:
Lion Kortlepel
2021-08-31 11:50:06 +03:00
committed by Lion
parent fe36191baf
commit 809a851c71
9 changed files with 34 additions and 81 deletions

View File

@@ -44,9 +44,7 @@ void THeartbeatThread::operator()() {
{ { "response-body", T },
{ "request-body", Body } });
Sentry.SetTransaction(transaction);
#if DEBUG
debug("sending log to sentry: " + std::to_string(status) + " for " + transaction);
#endif // DEBUG
trace("sending log to sentry: " + std::to_string(status) + " for " + transaction);
Sentry.Log(SentryLevel::Error, "default", Http::Status::ToString(status) + " (" + std::to_string(status) + ")");
};
@@ -55,9 +53,7 @@ void THeartbeatThread::operator()() {
T = Http::POST(Application::GetBackendHostname(), Target, {}, Body, false, &ResponseCode);
if (T.substr(0, 2) != "20" || ResponseCode != 200) {
#if DEBUG
debug("got " + T + " from backend");
#endif // DEBUG
trace("got " + T + " from backend");
SentryReportError(Application::GetBackendHostname() + Target, ResponseCode);
std::this_thread::sleep_for(std::chrono::milliseconds(500));
T = Http::POST(Application::GetBackup1Hostname(), Target, {}, Body, false, &ResponseCode);