aboutsummaryrefslogtreecommitdiff
path: root/src/server/bnetserver/Main.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-01-08 21:16:53 +0100
committerShauren <shauren.trinity@gmail.com>2023-01-08 21:16:53 +0100
commitd791afae1dfcfaf592326f787755ca32d629e4d3 (patch)
tree54dc9916ede5800e110a2f0edff91530811fbdb8 /src/server/bnetserver/Main.cpp
parentb6820a706f46f18b9652fcd9806e4bec8805d29d (diff)
Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api)
Diffstat (limited to 'src/server/bnetserver/Main.cpp')
-rw-r--r--src/server/bnetserver/Main.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/server/bnetserver/Main.cpp b/src/server/bnetserver/Main.cpp
index c8c414aeacd..00fd64b3dd8 100644
--- a/src/server/bnetserver/Main.cpp
+++ b/src/server/bnetserver/Main.cpp
@@ -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;
}