aboutsummaryrefslogtreecommitdiff
path: root/src/server/authserver/Main.cpp
diff options
context:
space:
mode:
authorSpp <spp@jorge.gr>2013-11-08 10:50:51 +0100
committerSpp <spp@jorge.gr>2013-11-08 10:50:51 +0100
commit94e2b9332a1f6ceec024338b8f41cd3dca099a40 (patch)
treec907b9f17ca4ca37d405bb1aca6439645e366a4b /src/server/authserver/Main.cpp
parent16a51e328a12b8eafb7ff2c18806ca9aef6b23a2 (diff)
Core/Logging: Remove LOG_FILTER_XXX defines with it's value (remember logger names are case-sensitive)
Diffstat (limited to 'src/server/authserver/Main.cpp')
-rw-r--r--src/server/authserver/Main.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp
index b16e86a7f9f..80a810e4ce1 100644
--- a/src/server/authserver/Main.cpp
+++ b/src/server/authserver/Main.cpp
@@ -77,7 +77,7 @@ public:
/// Print out the usage string for this program on the console.
void usage(const char* prog)
{
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "Usage: \n %s [<options>]\n"
+ TC_LOG_INFO("server.authserver", "Usage: \n %s [<options>]\n"
" -c config_file use config_file as configuration file\n\r",
prog);
}
@@ -111,11 +111,11 @@ extern int main(int argc, char** argv)
return 1;
}
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "%s (authserver)", _FULLVERSION);
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "<Ctrl-C> to stop.\n");
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "Using configuration file %s.", configFile);
+ TC_LOG_INFO("server.authserver", "%s (authserver)", _FULLVERSION);
+ TC_LOG_INFO("server.authserver", "<Ctrl-C> to stop.\n");
+ TC_LOG_INFO("server.authserver", "Using configuration file %s.", configFile);
- TC_LOG_WARN(LOG_FILTER_AUTHSERVER, "%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
+ TC_LOG_WARN("server.authserver", "%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
#if defined (ACE_HAS_EVENT_POLL) || defined (ACE_HAS_DEV_POLL)
ACE_Reactor::instance(new ACE_Reactor(new ACE_Dev_Poll_Reactor(ACE::max_handles(), 1), 1), true);
@@ -123,17 +123,17 @@ extern int main(int argc, char** argv)
ACE_Reactor::instance(new ACE_Reactor(new ACE_TP_Reactor(), true), true);
#endif
- TC_LOG_DEBUG(LOG_FILTER_AUTHSERVER, "Max allowed open files is %d", ACE::max_handles());
+ TC_LOG_DEBUG("server.authserver", "Max allowed open files is %d", ACE::max_handles());
// authserver PID file creation
std::string pidFile = sConfigMgr->GetStringDefault("PidFile", "");
if (!pidFile.empty())
{
if (uint32 pid = CreatePIDFile(pidFile))
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "Daemon PID: %u\n", pid);
+ TC_LOG_INFO("server.authserver", "Daemon PID: %u\n", pid);
else
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Cannot create PID file %s.\n", pidFile.c_str());
+ TC_LOG_ERROR("server.authserver", "Cannot create PID file %s.\n", pidFile.c_str());
return 1;
}
}
@@ -146,7 +146,7 @@ extern int main(int argc, char** argv)
sRealmList->Initialize(sConfigMgr->GetIntDefault("RealmsStateUpdateDelay", 20));
if (sRealmList->size() == 0)
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "No valid realms specified.");
+ TC_LOG_ERROR("server.authserver", "No valid realms specified.");
return 1;
}
@@ -156,7 +156,7 @@ extern int main(int argc, char** argv)
int32 rmport = sConfigMgr->GetIntDefault("RealmServerPort", 3724);
if (rmport < 0 || rmport > 0xFFFF)
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Specified port out of allowed range (1-65535)");
+ TC_LOG_ERROR("server.authserver", "Specified port out of allowed range (1-65535)");
return 1;
}
@@ -166,7 +166,7 @@ extern int main(int argc, char** argv)
if (acceptor.open(bind_addr, ACE_Reactor::instance(), ACE_NONBLOCK) == -1)
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Auth server can not bind to %s:%d", bind_ip.c_str(), rmport);
+ TC_LOG_ERROR("server.authserver", "Auth server can not bind to %s:%d", bind_ip.c_str(), rmport);
return 1;
}
@@ -196,20 +196,20 @@ extern int main(int argc, char** argv)
ULONG_PTR currentAffinity = affinity & appAff; // remove non accessible processors
if (!currentAffinity)
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Processors marked in UseProcessors bitmask (hex) %x are not accessible for the authserver. Accessible processors bitmask (hex): %x", affinity, appAff);
+ TC_LOG_ERROR("server.authserver", "Processors marked in UseProcessors bitmask (hex) %x are not accessible for the authserver. Accessible processors bitmask (hex): %x", affinity, appAff);
else if (SetProcessAffinityMask(hProcess, currentAffinity))
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "Using processors (bitmask, hex): %x", currentAffinity);
+ TC_LOG_INFO("server.authserver", "Using processors (bitmask, hex): %x", currentAffinity);
else
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Can't set used processors (hex): %x", currentAffinity);
+ TC_LOG_ERROR("server.authserver", "Can't set used processors (hex): %x", currentAffinity);
}
}
if (highPriority)
{
if (SetPriorityClass(hProcess, HIGH_PRIORITY_CLASS))
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "authserver process priority class set to HIGH");
+ TC_LOG_INFO("server.authserver", "authserver process priority class set to HIGH");
else
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Can't set authserver process priority class.");
+ TC_LOG_ERROR("server.authserver", "Can't set authserver process priority class.");
}
}
#elif __linux__ // Linux
@@ -224,21 +224,21 @@ extern int main(int argc, char** argv)
CPU_SET(i, &mask);
if (sched_setaffinity(0, sizeof(mask), &mask))
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Can't set used processors (hex): %x, error: %s", affinity, strerror(errno));
+ TC_LOG_ERROR("server.authserver", "Can't set used processors (hex): %x, error: %s", affinity, strerror(errno));
else
{
CPU_ZERO(&mask);
sched_getaffinity(0, sizeof(mask), &mask);
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "Using processors (bitmask, hex): %x", *(uint32*)(&mask));
+ TC_LOG_INFO("server.authserver", "Using processors (bitmask, hex): %x", *(uint32*)(&mask));
}
}
if (highPriority)
{
if (setpriority(PRIO_PROCESS, 0, PROCESS_HIGH_PRIORITY))
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Can't set authserver process priority class, error: %s", strerror(errno));
+ TC_LOG_ERROR("server.authserver", "Can't set authserver process priority class, error: %s", strerror(errno));
else
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "authserver process priority class set to %i", getpriority(PRIO_PROCESS, 0));
+ TC_LOG_INFO("server.authserver", "authserver process priority class set to %i", getpriority(PRIO_PROCESS, 0));
}
#endif
@@ -259,7 +259,7 @@ extern int main(int argc, char** argv)
if ((++loopCounter) == numLoops)
{
loopCounter = 0;
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "Ping MySQL to keep connection alive");
+ TC_LOG_INFO("server.authserver", "Ping MySQL to keep connection alive");
LoginDatabase.KeepAlive();
}
}
@@ -267,7 +267,7 @@ extern int main(int argc, char** argv)
// Close the Database Pool and library
StopDB();
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "Halting process...");
+ TC_LOG_INFO("server.authserver", "Halting process...");
return 0;
}
@@ -279,32 +279,32 @@ bool StartDB()
std::string dbstring = sConfigMgr->GetStringDefault("LoginDatabaseInfo", "");
if (dbstring.empty())
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Database not specified");
+ TC_LOG_ERROR("server.authserver", "Database not specified");
return false;
}
int32 worker_threads = sConfigMgr->GetIntDefault("LoginDatabase.WorkerThreads", 1);
if (worker_threads < 1 || worker_threads > 32)
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Improper value specified for LoginDatabase.WorkerThreads, defaulting to 1.");
+ TC_LOG_ERROR("server.authserver", "Improper value specified for LoginDatabase.WorkerThreads, defaulting to 1.");
worker_threads = 1;
}
int32 synch_threads = sConfigMgr->GetIntDefault("LoginDatabase.SynchThreads", 1);
if (synch_threads < 1 || synch_threads > 32)
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Improper value specified for LoginDatabase.SynchThreads, defaulting to 1.");
+ TC_LOG_ERROR("server.authserver", "Improper value specified for LoginDatabase.SynchThreads, defaulting to 1.");
synch_threads = 1;
}
// NOTE: While authserver is singlethreaded you should keep synch_threads == 1. Increasing it is just silly since only 1 will be used ever.
if (!LoginDatabase.Open(dbstring, uint8(worker_threads), uint8(synch_threads)))
{
- TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Cannot connect to database");
+ TC_LOG_ERROR("server.authserver", "Cannot connect to database");
return false;
}
- TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "Started auth database connection pool.");
+ TC_LOG_INFO("server.authserver", "Started auth database connection pool.");
sLog->SetRealmId(0); // Enables DB appenders when realm is set.
return true;
}