mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
feat(Core/Logging): rework logging (#4692)
* feat(Core/Logging): rework logging * correct level for sql.sql * del unused config options * Correct build * correct after merge * whitespace 20:29:37 1. 'Player.cpp'. Replace (1) 20:29:37 2. 'ObjectMgr.cpp'. Replace (3) * 1 * correct logging * correct affter merge * 1 * 2 * LOG_LEVEL_WARN * #include "AppenderDB.h" * 3 * 4 * 5 * 1. 'WorldSocket.cpp'. Replace (1) * 6 * 1
This commit is contained in:
@@ -138,7 +138,7 @@ protected:
|
||||
int svc() override
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outStaticDebug ("Network Thread Starting");
|
||||
LOG_DEBUG("server", "Network Thread Starting");
|
||||
#endif
|
||||
|
||||
ASSERT(m_Reactor);
|
||||
@@ -177,7 +177,7 @@ protected:
|
||||
}
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outStaticDebug ("Network Thread exits");
|
||||
LOG_DEBUG("server", "Network Thread exits");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
@@ -228,7 +228,7 @@ WorldSocketMgr::StartReactiveIO (uint16 port, const char* address)
|
||||
|
||||
if (num_threads <= 0)
|
||||
{
|
||||
sLog->outError("Network.Threads is wrong in your config file");
|
||||
LOG_ERROR("server", "Network.Threads is wrong in your config file");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ WorldSocketMgr::StartReactiveIO (uint16 port, const char* address)
|
||||
|
||||
m_NetThreads = new ReactorRunnable[m_NetThreadsCount];
|
||||
|
||||
sLog->outBasic ("Max allowed socket connections %d", ACE::max_handles());
|
||||
LOG_INFO("server", "Max allowed socket connections %d", ACE::max_handles());
|
||||
|
||||
// -1 means use default
|
||||
m_SockOutKBuff = sConfigMgr->GetOption<int32> ("Network.OutKBuff", -1);
|
||||
@@ -245,7 +245,7 @@ WorldSocketMgr::StartReactiveIO (uint16 port, const char* address)
|
||||
|
||||
if (m_SockOutUBuff <= 0)
|
||||
{
|
||||
sLog->outError("Network.OutUBuff is wrong in your config file");
|
||||
LOG_ERROR("server", "Network.OutUBuff is wrong in your config file");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ WorldSocketMgr::StartReactiveIO (uint16 port, const char* address)
|
||||
|
||||
if (m_Acceptor->open(listen_addr, m_NetThreads[0].GetReactor(), ACE_NONBLOCK) == -1)
|
||||
{
|
||||
sLog->outError("Failed to open acceptor, check if the port is free");
|
||||
LOG_ERROR("server", "Failed to open acceptor, check if the port is free");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -268,8 +268,8 @@ WorldSocketMgr::StartReactiveIO (uint16 port, const char* address)
|
||||
int
|
||||
WorldSocketMgr::StartNetwork (uint16 port, const char* address)
|
||||
{
|
||||
if (!sLog->IsOutDebug())
|
||||
ACE_Log_Msg::instance()->priority_mask (LM_ERROR, ACE_Log_Msg::PROCESS);
|
||||
if (!sLog->ShouldLog("network", LogLevel::LOG_LEVEL_DEBUG))
|
||||
ACE_Log_Msg::instance()->priority_mask(LM_ERROR, ACE_Log_Msg::PROCESS);
|
||||
|
||||
if (StartReactiveIO(port, address) == -1)
|
||||
return -1;
|
||||
@@ -319,7 +319,7 @@ WorldSocketMgr::OnSocketOpen (WorldSocket* sock)
|
||||
(void*) & m_SockOutKBuff,
|
||||
sizeof (int)) == -1 && errno != ENOTSUP)
|
||||
{
|
||||
sLog->outError("WorldSocketMgr::OnSocketOpen set_option SO_SNDBUF");
|
||||
LOG_ERROR("server", "WorldSocketMgr::OnSocketOpen set_option SO_SNDBUF");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -334,7 +334,7 @@ WorldSocketMgr::OnSocketOpen (WorldSocket* sock)
|
||||
(void*)&ndoption,
|
||||
sizeof (int)) == -1)
|
||||
{
|
||||
sLog->outError("WorldSocketMgr::OnSocketOpen: peer().set_option TCP_NODELAY errno = %s", ACE_OS::strerror (errno));
|
||||
LOG_ERROR("server", "WorldSocketMgr::OnSocketOpen: peer().set_option TCP_NODELAY errno = %s", ACE_OS::strerror (errno));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user