mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +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:
@@ -61,7 +61,7 @@ void BanExpiryHandler(std::weak_ptr<Acore::Asio::DeadlineTimer> banExpiryCheckTi
|
||||
/// Print out the usage string for this program on the console.
|
||||
void usage(const char* prog)
|
||||
{
|
||||
LOG_INFO("server.authserver", "Usage: \n %s [<options>]\n"
|
||||
LOG_INFO("server.authserver", "Usage: \n {} [<options>]\n"
|
||||
" -c config_file use config_file as configuration file\n\r", prog);
|
||||
}
|
||||
|
||||
@@ -103,13 +103,13 @@ int main(int argc, char** argv)
|
||||
Acore::Banner::Show("authserver",
|
||||
[](std::string_view text)
|
||||
{
|
||||
FMT_LOG_INFO("server.authserver", text);
|
||||
LOG_INFO("server.authserver", text);
|
||||
},
|
||||
[]()
|
||||
{
|
||||
FMT_LOG_INFO("server.authserver", "> Using configuration file {}", sConfigMgr->GetFilename());
|
||||
FMT_LOG_INFO("server.authserver", "> Using SSL version: {} (library: {})", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
|
||||
FMT_LOG_INFO("server.authserver", "> Using Boost version: {}.{}.{}", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100);
|
||||
LOG_INFO("server.authserver", "> Using configuration file {}", sConfigMgr->GetFilename());
|
||||
LOG_INFO("server.authserver", "> Using SSL version: {} (library: {})", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
|
||||
LOG_INFO("server.authserver", "> Using Boost version: {}.{}.{}", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100);
|
||||
});
|
||||
|
||||
// authserver PID file creation
|
||||
@@ -117,10 +117,10 @@ int main(int argc, char** argv)
|
||||
if (!pidFile.empty())
|
||||
{
|
||||
if (uint32 pid = CreatePIDFile(pidFile))
|
||||
LOG_INFO("server.authserver", "Daemon PID: %u\n", pid); // outError for red color in console
|
||||
LOG_INFO("server.authserver", "Daemon PID: {}\n", pid); // outError for red color in console
|
||||
else
|
||||
{
|
||||
LOG_ERROR("server.authserver", "Cannot create PID file %s (possible error: permission)\n", pidFile.c_str());
|
||||
LOG_ERROR("server.authserver", "Cannot create PID file {} (possible error: permission)\n", pidFile);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user