mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
refactor(Core/Logging): switch to fmt style for LOG_ (#10366)
* feat(Core/Common): add support fmt style for ASSERT and ABORT * correct CheckCompactArrayMaskOverflow * 1 * Update src/server/game/Spells/Spell.cpp * rework logging * add fmt replace logs * logging * FMT_LOG_ * settings * fix startup * 1 * 2 * 3 * 4 * 5 * fmt::print * to fmt
This commit is contained in:
@@ -56,7 +56,7 @@ bool Metric::Connect()
|
||||
auto error = stream.error();
|
||||
if (error)
|
||||
{
|
||||
FMT_LOG_ERROR("metric", "Error connecting to '{}:{}', disabling Metric. Error message: {}",
|
||||
LOG_ERROR("metric", "Error connecting to '{}:{}', disabling Metric. Error message: {}",
|
||||
_hostname, _port, error.message());
|
||||
|
||||
_enabled = false;
|
||||
@@ -75,14 +75,14 @@ void Metric::LoadFromConfigs()
|
||||
|
||||
if (_updateInterval < 1)
|
||||
{
|
||||
FMT_LOG_ERROR("metric", "'Metric.Interval' config set to {}, overriding to 1.", _updateInterval);
|
||||
LOG_ERROR("metric", "'Metric.Interval' config set to {}, overriding to 1.", _updateInterval);
|
||||
_updateInterval = 1;
|
||||
}
|
||||
|
||||
_overallStatusTimerInterval = sConfigMgr->GetOption<int32>("Metric.OverallStatusInterval", 1);
|
||||
if (_overallStatusTimerInterval < 1)
|
||||
{
|
||||
FMT_LOG_ERROR("metric", "'Metric.OverallStatusInterval' config set to {}, overriding to 1.", _overallStatusTimerInterval);
|
||||
LOG_ERROR("metric", "'Metric.OverallStatusInterval' config set to {}, overriding to 1.", _overallStatusTimerInterval);
|
||||
_overallStatusTimerInterval = 1;
|
||||
}
|
||||
|
||||
@@ -102,14 +102,14 @@ void Metric::LoadFromConfigs()
|
||||
std::string connectionInfo = sConfigMgr->GetOption<std::string>("Metric.ConnectionInfo", "");
|
||||
if (connectionInfo.empty())
|
||||
{
|
||||
FMT_LOG_ERROR("metric", "'Metric.ConnectionInfo' not specified in configuration file.");
|
||||
LOG_ERROR("metric", "'Metric.ConnectionInfo' not specified in configuration file.");
|
||||
return;
|
||||
}
|
||||
|
||||
std::vector<std::string_view> tokens = Acore::Tokenize(connectionInfo, ';', true);
|
||||
if (tokens.size() != 3)
|
||||
{
|
||||
FMT_LOG_ERROR("metric", "'Metric.ConnectionInfo' specified with wrong format in configuration file.");
|
||||
LOG_ERROR("metric", "'Metric.ConnectionInfo' specified with wrong format in configuration file.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ void Metric::SendBatch()
|
||||
|
||||
if (status_code != 204)
|
||||
{
|
||||
FMT_LOG_ERROR("metric", "Error sending data, returned HTTP code: {}", status_code);
|
||||
LOG_ERROR("metric", "Error sending data, returned HTTP code: {}", status_code);
|
||||
}
|
||||
|
||||
// Read and ignore the status description
|
||||
|
||||
Reference in New Issue
Block a user