diff options
Diffstat (limited to 'src/common/Metric/Metric.cpp')
-rw-r--r-- | src/common/Metric/Metric.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/Metric/Metric.cpp b/src/common/Metric/Metric.cpp index 843f4c16f56..06c084a3c2c 100644 --- a/src/common/Metric/Metric.cpp +++ b/src/common/Metric/Metric.cpp @@ -42,8 +42,8 @@ bool Metric::Connect() auto error = stream.error(); if (error) { - TC_LOG_ERROR("metric", "Error connecting to '%s:%s', disabling Metric. Error message : %s", - _hostname.c_str(), _port.c_str(), error.message().c_str()); + TC_LOG_ERROR("metric", "Error connecting to '{}:{}', disabling Metric. Error message : {}", + _hostname, _port, error.message()); _enabled = false; return false; } @@ -58,14 +58,14 @@ void Metric::LoadFromConfigs() _updateInterval = sConfigMgr->GetIntDefault("Metric.Interval", 1); if (_updateInterval < 1) { - TC_LOG_ERROR("metric", "'Metric.Interval' config set to %d, overriding to 1.", _updateInterval); + TC_LOG_ERROR("metric", "'Metric.Interval' config set to {}, overriding to 1.", _updateInterval); _updateInterval = 1; } _overallStatusTimerInterval = sConfigMgr->GetIntDefault("Metric.OverallStatusInterval", 1); if (_overallStatusTimerInterval < 1) { - TC_LOG_ERROR("metric", "'Metric.OverallStatusInterval' config set to %d, overriding to 1.", _overallStatusTimerInterval); + TC_LOG_ERROR("metric", "'Metric.OverallStatusInterval' config set to {}, overriding to 1.", _overallStatusTimerInterval); _overallStatusTimerInterval = 1; } @@ -201,7 +201,7 @@ void Metric::SendBatch() GetDataStream() >> status_code; if (status_code != 204) { - TC_LOG_ERROR("metric", "Error sending data, returned HTTP code: %u", status_code); + TC_LOG_ERROR("metric", "Error sending data, returned HTTP code: {}", status_code); } // Read and ignore the status description |