mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api)
This commit is contained in:
@@ -123,18 +123,18 @@ int main(int argc, char** argv)
|
||||
Trinity::Banner::Show("bnetserver",
|
||||
[](char const* text)
|
||||
{
|
||||
TC_LOG_INFO("server.bnetserver", "%s", text);
|
||||
TC_LOG_INFO("server.bnetserver", "{}", text);
|
||||
},
|
||||
[]()
|
||||
{
|
||||
TC_LOG_INFO("server.bnetserver", "Using configuration file %s.", sConfigMgr->GetFilename().c_str());
|
||||
TC_LOG_INFO("server.bnetserver", "Using SSL version: %s (library: %s)", OPENSSL_VERSION_TEXT, OpenSSL_version(OPENSSL_VERSION));
|
||||
TC_LOG_INFO("server.bnetserver", "Using Boost version: %i.%i.%i", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100);
|
||||
TC_LOG_INFO("server.bnetserver", "Using configuration file {}.", sConfigMgr->GetFilename());
|
||||
TC_LOG_INFO("server.bnetserver", "Using SSL version: {} (library: {})", OPENSSL_VERSION_TEXT, OpenSSL_version(OPENSSL_VERSION));
|
||||
TC_LOG_INFO("server.bnetserver", "Using Boost version: {}.{}.{}", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100);
|
||||
}
|
||||
);
|
||||
|
||||
for (std::string const& key : overriddenKeys)
|
||||
TC_LOG_INFO("server.authserver", "Configuration field '%s' was overridden with environment variable.", key.c_str());
|
||||
TC_LOG_INFO("server.authserver", "Configuration field '{}' was overridden with environment variable.", key);
|
||||
|
||||
OpenSSLCrypto::threadsSetup(boost::dll::program_location().remove_filename());
|
||||
|
||||
@@ -145,10 +145,10 @@ int main(int argc, char** argv)
|
||||
if (!pidFile.empty())
|
||||
{
|
||||
if (uint32 pid = CreatePIDFile(pidFile))
|
||||
TC_LOG_INFO("server.bnetserver", "Daemon PID: %u\n", pid);
|
||||
TC_LOG_INFO("server.bnetserver", "Daemon PID: {}\n", pid);
|
||||
else
|
||||
{
|
||||
TC_LOG_ERROR("server.bnetserver", "Cannot create PID file %s.\n", pidFile.c_str());
|
||||
TC_LOG_ERROR("server.bnetserver", "Cannot create PID file {}.\n", pidFile);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -179,7 +179,7 @@ int main(int argc, char** argv)
|
||||
int32 bnport = sConfigMgr->GetIntDefault("BattlenetPort", 1119);
|
||||
if (bnport < 0 || bnport > 0xFFFF)
|
||||
{
|
||||
TC_LOG_ERROR("server.bnetserver", "Specified battle.net port (%d) out of allowed range (1-65535)", bnport);
|
||||
TC_LOG_ERROR("server.bnetserver", "Specified battle.net port ({}) out of allowed range (1-65535)", bnport);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user