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:
Kargatum 2022-01-27 22:44:41 +07:00 committed by GitHub
parent 5228d29379
commit 5969df4e30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
211 changed files with 3689 additions and 3842 deletions

View file

@ -41,15 +41,15 @@ DatabaseLoader& DatabaseLoader::AddDatabase(DatabaseWorkerPool<T>& pool, std::st
std::string const dbString = sConfigMgr->GetOption<std::string>(name + "DatabaseInfo", "");
if (dbString.empty())
{
LOG_ERROR(_logger, "Database %s not specified in configuration file!", name.c_str());
LOG_ERROR(_logger, "Database {} not specified in configuration file!", name);
return false;
}
uint8 const asyncThreads = sConfigMgr->GetOption<uint8>(name + "Database.WorkerThreads", 1);
if (asyncThreads < 1 || asyncThreads > 32)
{
LOG_ERROR(_logger, "%s database: invalid number of worker threads specified. "
"Please pick a value between 1 and 32.", name.c_str());
LOG_ERROR(_logger, "{} database: invalid number of worker threads specified. "
"Please pick a value between 1 and 32.", name);
return false;
}
@ -68,7 +68,7 @@ DatabaseLoader& DatabaseLoader::AddDatabase(DatabaseWorkerPool<T>& pool, std::st
while (reconnectCount < attempts)
{
LOG_INFO(_logger, "> Retrying after %u seconds", static_cast<uint32>(reconnectSeconds.count()));
LOG_INFO(_logger, "> Retrying after {} seconds", static_cast<uint32>(reconnectSeconds.count()));
std::this_thread::sleep_for(reconnectSeconds);
error = pool.Open();
@ -96,8 +96,8 @@ DatabaseLoader& DatabaseLoader::AddDatabase(DatabaseWorkerPool<T>& pool, std::st
// If the error wasn't handled quit
if (error)
{
LOG_ERROR(_logger, "DatabasePool %s NOT opened. There were errors opening the MySQL connections. "
"Check your log file for specific errors", name.c_str());
LOG_ERROR(_logger, "DatabasePool {} NOT opened. There were errors opening the MySQL connections. "
"Check your log file for specific errors", name);
return false;
}
@ -118,7 +118,7 @@ DatabaseLoader& DatabaseLoader::AddDatabase(DatabaseWorkerPool<T>& pool, std::st
{
if (!DBUpdater<T>::Populate(pool))
{
LOG_ERROR(_logger, "Could not populate the %s database, see log for details.", name.c_str());
LOG_ERROR(_logger, "Could not populate the {} database, see log for details.", name);
return false;
}
@ -129,7 +129,7 @@ DatabaseLoader& DatabaseLoader::AddDatabase(DatabaseWorkerPool<T>& pool, std::st
{
if (!DBUpdater<T>::Update(pool, _modulesList))
{
LOG_ERROR(_logger, "Could not update the %s database, see log for details.", name.c_str());
LOG_ERROR(_logger, "Could not update the {} database, see log for details.", name);
return false;
}
@ -141,7 +141,7 @@ DatabaseLoader& DatabaseLoader::AddDatabase(DatabaseWorkerPool<T>& pool, std::st
{
if (!pool.PrepareStatements())
{
LOG_ERROR(_logger, "Could not prepare statements of the %s database, see log for details.", name.c_str());
LOG_ERROR(_logger, "Could not prepare statements of the {} database, see log for details.", name);
return false;
}