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:
Kargatum
2021-04-17 16:20:07 +07:00
committed by GitHub
parent b2861be1cd
commit 4af4cbd3d9
246 changed files with 7413 additions and 6807 deletions
+9 -9
View File
@@ -39,7 +39,7 @@ Warden::~Warden()
void Warden::SendModuleToClient()
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Send module to client");
LOG_DEBUG("warden", "Send module to client");
#endif
// Create packet structure
@@ -67,7 +67,7 @@ void Warden::SendModuleToClient()
void Warden::RequestModule()
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Request module");
LOG_DEBUG("warden", "Request module");
#endif
// Create packet structure
@@ -140,14 +140,14 @@ bool Warden::IsValidCheckSum(uint32 checksum, const uint8* data, const uint16 le
if (checksum != newChecksum)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "CHECKSUM IS NOT VALID");
LOG_DEBUG("warden", "CHECKSUM IS NOT VALID");
#endif
return false;
}
else
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "CHECKSUM IS VALID");
LOG_DEBUG("warden", "CHECKSUM IS VALID");
#endif
return true;
}
@@ -274,7 +274,7 @@ void Warden::ApplyPenalty(uint16 checkId, std::string const& reason)
}
reportMsg = "Warden: " + reportMsg;
sLog->outString(reportMsg.c_str());
LOG_INFO("warden", "> Warden: %s", reportMsg.c_str());
}
bool Warden::ProcessLuaCheckResponse(std::string const& msg)
@@ -322,7 +322,7 @@ void WorldSession::HandleWardenDataOpcode(WorldPacket& recvData)
uint8 opcode;
recvData >> opcode;
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Got packet, opcode %02X, size %u", opcode, uint32(recvData.size()));
LOG_DEBUG("warden", "Got packet, opcode %02X, size %u", opcode, uint32(recvData.size()));
#endif
recvData.hexlike();
@@ -339,7 +339,7 @@ void WorldSession::HandleWardenDataOpcode(WorldPacket& recvData)
break;
case WARDEN_CMSG_MEM_CHECKS_RESULT:
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "NYI WARDEN_CMSG_MEM_CHECKS_RESULT received!");
LOG_DEBUG("warden", "NYI WARDEN_CMSG_MEM_CHECKS_RESULT received!");
#endif
break;
case WARDEN_CMSG_HASH_RESULT:
@@ -348,12 +348,12 @@ void WorldSession::HandleWardenDataOpcode(WorldPacket& recvData)
break;
case WARDEN_CMSG_MODULE_FAILED:
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "NYI WARDEN_CMSG_MODULE_FAILED received!");
LOG_DEBUG("warden", "NYI WARDEN_CMSG_MODULE_FAILED received!");
#endif
break;
default:
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Got unknown warden opcode %02X of size %u.", opcode, uint32(recvData.size() - 1));
LOG_DEBUG("warden", "Got unknown warden opcode %02X of size %u.", opcode, uint32(recvData.size() - 1));
#endif
break;
}
+16 -16
View File
@@ -32,8 +32,8 @@ void WardenCheckMgr::LoadWardenChecks()
// Check if Warden is enabled by config before loading anything
if (!sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED))
{
sLog->outString(">> Warden disabled, loading checks skipped.");
sLog->outString();
LOG_INFO("server", ">> Warden disabled, loading checks skipped.");
LOG_INFO("server", " ");
return;
}
@@ -41,8 +41,8 @@ void WardenCheckMgr::LoadWardenChecks()
if (!result)
{
sLog->outString(">> Loaded 0 Warden checks. DB table `warden_checks` is empty!");
sLog->outString();
LOG_INFO("server", ">> Loaded 0 Warden checks. DB table `warden_checks` is empty!");
LOG_INFO("server", " ");
return;
}
@@ -65,7 +65,7 @@ void WardenCheckMgr::LoadWardenChecks()
if (checkType == LUA_EVAL_CHECK && id > 9999)
{
sLog->outError("sql.sql: Warden Lua check with id %u found in `warden_checks`. Lua checks may have four-digit IDs at most. Skipped.", id);
LOG_ERROR("server", "sql.sql: Warden Lua check with id %u found in `warden_checks`. Lua checks may have four-digit IDs at most. Skipped.", id);
continue;
}
@@ -124,7 +124,7 @@ void WardenCheckMgr::LoadWardenChecks()
{
if (wardenCheck.Length > WARDEN_MAX_LUA_CHECK_LENGTH)
{
sLog->outError("sql.sql: Found over-long Lua check for Warden check with id %u in `warden_checks`. Max length is %u. Skipped.", id, WARDEN_MAX_LUA_CHECK_LENGTH);
LOG_ERROR("server", "sql.sql: Found over-long Lua check for Warden check with id %u in `warden_checks`. Max length is %u. Skipped.", id, WARDEN_MAX_LUA_CHECK_LENGTH);
continue;
}
@@ -148,8 +148,8 @@ void WardenCheckMgr::LoadWardenChecks()
++count;
} while (result->NextRow());
sLog->outString(">> Loaded %u warden checks.", count);
sLog->outString();
LOG_INFO("server", ">> Loaded %u warden checks.", count);
LOG_INFO("server", " ");
}
void WardenCheckMgr::LoadWardenOverrides()
@@ -157,8 +157,8 @@ void WardenCheckMgr::LoadWardenOverrides()
// Check if Warden is enabled by config before loading anything
if (!sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED))
{
sLog->outString(">> Warden disabled, loading check overrides skipped.");
sLog->outString();
LOG_INFO("server", ">> Warden disabled, loading check overrides skipped.");
LOG_INFO("server", " ");
return;
}
@@ -167,8 +167,8 @@ void WardenCheckMgr::LoadWardenOverrides()
if (!result)
{
sLog->outString(">> Loaded 0 Warden action overrides. DB table `warden_action` is empty!");
sLog->outString();
LOG_INFO("server", ">> Loaded 0 Warden action overrides. DB table `warden_action` is empty!");
LOG_INFO("server", " ");
return;
}
@@ -183,10 +183,10 @@ void WardenCheckMgr::LoadWardenOverrides()
// Check if action value is in range (0-2, see WardenActions enum)
if (action > WARDEN_ACTION_BAN)
sLog->outError("Warden check override action out of range (ID: %u, action: %u)", checkId, action);
LOG_ERROR("server", "Warden check override action out of range (ID: %u, action: %u)", checkId, action);
// Check if check actually exists before accessing the CheckStore vector
else if (checkId > CheckStore.size())
sLog->outError("Warden check action override for non-existing check (ID: %u, action: %u), skipped", checkId, action);
LOG_ERROR("server", "Warden check action override for non-existing check (ID: %u, action: %u), skipped", checkId, action);
else
{
CheckStore.at(checkId).Action = WardenActions(action);
@@ -194,8 +194,8 @@ void WardenCheckMgr::LoadWardenOverrides()
}
} while (result->NextRow());
sLog->outString(">> Loaded %u warden action overrides.", count);
sLog->outString();
LOG_INFO("server", ">> Loaded %u warden action overrides.", count);
LOG_INFO("server", " ");
}
WardenCheck const* WardenCheckMgr::GetWardenDataById(uint16 Id)
+16 -15
View File
@@ -46,19 +46,20 @@ void WardenMac::Init(WorldSession* pClient, SessionKey const& K)
_inputCrypto.Init(_inputKey);
_outputCrypto.Init(_outputKey);
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Server side warden for client %u initializing...", pClient->GetAccountId());
sLog->outDebug(LOG_FILTER_WARDEN, "C->S Key: %s", acore::Impl::ByteArrayToHexStr(_inputKey, false).c_str());
sLog->outDebug(LOG_FILTER_WARDEN, "S->C Key: %s", acore::Impl::ByteArrayToHexStr(_outputKey, false ).c_str());
sLog->outDebug(LOG_FILTER_WARDEN, " Seed: %s", acore::Impl::ByteArrayToHexStr(_seed, false).c_str());
sLog->outDebug(LOG_FILTER_WARDEN, "Loading Module...");
LOG_DEBUG("warden", "Server side warden for client %u initializing...", pClient->GetAccountId());
LOG_DEBUG("warden", "C->S Key: %s", acore::Impl::ByteArrayToHexStr(_inputKey, false).c_str());
LOG_DEBUG("warden", "S->C Key: %s", acore::Impl::ByteArrayToHexStr(_outputKey, false ).c_str());
LOG_DEBUG("warden", " Seed: %s", acore::Impl::ByteArrayToHexStr(_seed, false).c_str());
LOG_DEBUG("warden", "Loading Module...");
#endif
_module = GetModuleForClient();
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Module Key: %s", acore::Impl::ByteArrayToHexStr(_module->Key, false).c_str());
sLog->outDebug(LOG_FILTER_WARDEN, "Module ID: %s", acore::Impl::ByteArrayToHexStr(_module->Id, false).c_str());
LOG_DEBUG("warden", "Module Key: %s", acore::Impl::ByteArrayToHexStr(_module->Key, false).c_str());
LOG_DEBUG("warden", "Module ID: %s", acore::Impl::ByteArrayToHexStr(_module->Id, false).c_str());
#endif
RequestModule();
}
@@ -87,14 +88,14 @@ ClientWardenModule* WardenMac::GetModuleForClient()
void WardenMac::InitializeModule()
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Initialize module");
LOG_DEBUG("warden", "Initialize module");
#endif
}
void WardenMac::RequestHash()
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Request hash");
LOG_DEBUG("warden", "Request hash");
#endif
// Create packet structure
@@ -164,14 +165,14 @@ void WardenMac::HandleHashResult(ByteBuffer& buff)
if (memcmp(buff.contents() + 1, sha1.GetDigest().data(), 20) != 0)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Request hash reply: failed");
LOG_DEBUG("warden", "Request hash reply: failed");
#endif
ApplyPenalty(0, "Request hash reply: failed");
return;
}
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Request hash reply: succeed");
LOG_DEBUG("warden", "Request hash reply: succeed");
#endif
// client 7F96EEFDA5B63D20A4DF8E00CBF48304
@@ -193,7 +194,7 @@ void WardenMac::HandleHashResult(ByteBuffer& buff)
void WardenMac::RequestChecks()
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Request data");
LOG_DEBUG("warden", "Request data");
#endif
ByteBuffer buff;
@@ -219,7 +220,7 @@ void WardenMac::RequestChecks()
void WardenMac::HandleData(ByteBuffer& buff)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Handle data");
LOG_DEBUG("warden", "Handle data");
#endif
_dataSent = false;
@@ -254,7 +255,7 @@ void WardenMac::HandleData(ByteBuffer& buff)
if (sha1Hash != sha1.GetDigest())
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Handle data failed: SHA1 hash is wrong!");
LOG_DEBUG("warden", "Handle data failed: SHA1 hash is wrong!");
#endif
//found = true;
}
@@ -271,7 +272,7 @@ void WardenMac::HandleData(ByteBuffer& buff)
if (memcmp(ourMD5Hash, theirsMD5Hash, 16))
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Handle data failed: MD5 hash is wrong!");
LOG_DEBUG("warden", "Handle data failed: MD5 hash is wrong!");
#endif
//found = true;
}
+33 -33
View File
@@ -104,18 +104,18 @@ void WardenWin::Init(WorldSession* session, SessionKey const& k)
_inputCrypto.Init(_inputKey);
_outputCrypto.Init(_outputKey);
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Server side warden for client %u initializing...", session->GetAccountId());
sLog->outDebug(LOG_FILTER_WARDEN, "C->S Key: %s", acore::Impl::ByteArrayToHexStr(_inputKey, false).c_str());
sLog->outDebug(LOG_FILTER_WARDEN, "S->C Key: %s", acore::Impl::ByteArrayToHexStr(_outputKey,false).c_str());
sLog->outDebug(LOG_FILTER_WARDEN, " Seed: %s", acore::Impl::ByteArrayToHexStr(_seed, false).c_str());
sLog->outDebug(LOG_FILTER_WARDEN, "Loading Module...");
LOG_DEBUG("warden", "Server side warden for client %u initializing...", session->GetAccountId());
LOG_DEBUG("warden", "C->S Key: %s", acore::Impl::ByteArrayToHexStr(_inputKey, false).c_str());
LOG_DEBUG("warden", "S->C Key: %s", acore::Impl::ByteArrayToHexStr(_outputKey,false).c_str());
LOG_DEBUG("warden", " Seed: %s", acore::Impl::ByteArrayToHexStr(_seed, false).c_str());
LOG_DEBUG("warden", "Loading Module...");
#endif
_module = GetModuleForClient();
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Module Key: %s", acore::Impl::ByteArrayToHexStr(_module->Key, false).c_str());
sLog->outDebug(LOG_FILTER_WARDEN, "Module ID: %s", acore::Impl::ByteArrayToHexStr(_module->Id, false).c_str());
LOG_DEBUG("warden", "Module Key: %s", acore::Impl::ByteArrayToHexStr(_module->Key, false).c_str());
LOG_DEBUG("warden", "Module ID: %s", acore::Impl::ByteArrayToHexStr(_module->Id, false).c_str());
#endif
RequestModule();
}
@@ -144,7 +144,7 @@ ClientWardenModule* WardenWin::GetModuleForClient()
void WardenWin::InitializeModule()
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Initialize module");
LOG_DEBUG("warden", "Initialize module");
#endif
// Create packet structure
@@ -203,7 +203,7 @@ void WardenWin::InitializeModule()
void WardenWin::RequestHash()
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Request hash");
LOG_DEBUG("warden", "Request hash");
#endif
// Create packet structure
@@ -227,14 +227,14 @@ void WardenWin::HandleHashResult(ByteBuffer& buff)
if (memcmp(buff.contents() + 1, Module.ClientKeySeedHash, acore::Crypto::Constants::SHA1_DIGEST_LENGTH_BYTES) != 0)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Request hash reply: failed");
LOG_DEBUG("warden", "Request hash reply: failed");
#endif
ApplyPenalty(0, "Request hash reply: failed");
return;
}
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Request hash reply: succeed");
LOG_DEBUG("warden", "Request hash reply: succeed");
#endif
// Change keys here
@@ -250,7 +250,7 @@ void WardenWin::HandleHashResult(ByteBuffer& buff)
void WardenWin::RequestChecks()
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Request data");
LOG_DEBUG("warden", "Request data");
#endif
// If all checks were done, fill the todo list again
@@ -454,14 +454,14 @@ void WardenWin::RequestChecks()
stream << checkId << " ";
}
sLog->outDebug(LOG_FILTER_WARDEN, "%s", stream.str().c_str());
LOG_DEBUG("warden", "%s", stream.str().c_str());
#endif
}
void WardenWin::HandleData(ByteBuffer& buff)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Handle data");
LOG_DEBUG("warden", "Handle data");
#endif
_dataSent = false;
@@ -483,7 +483,7 @@ void WardenWin::HandleData(ByteBuffer& buff)
{
buff.rpos(buff.wpos());
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "CHECKSUM FAIL");
LOG_DEBUG("warden", "CHECKSUM FAIL");
#endif
ApplyPenalty(0, "Failed checksum in HandleData");
return;
@@ -497,7 +497,7 @@ void WardenWin::HandleData(ByteBuffer& buff)
if (result == 0x00)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "TIMING CHECK FAIL result 0x00");
LOG_DEBUG("warden", "TIMING CHECK FAIL result 0x00");
#endif
ApplyPenalty(0, "TIMING CHECK FAIL result");
return;
@@ -510,10 +510,10 @@ void WardenWin::HandleData(ByteBuffer& buff)
uint32 ticksNow = World::GetGameTimeMS();
uint32 ourTicks = newClientTicks + (ticksNow - _serverTicks);
sLog->outDebug(LOG_FILTER_WARDEN, "ServerTicks %u", ticksNow); // Now
sLog->outDebug(LOG_FILTER_WARDEN, "RequestTicks %u", _serverTicks); // At request
sLog->outDebug(LOG_FILTER_WARDEN, "Ticks %u", newClientTicks); // At response
sLog->outDebug(LOG_FILTER_WARDEN, "Ticks diff %u", ourTicks - newClientTicks);
LOG_DEBUG("warden", "ServerTicks %u", ticksNow); // Now
LOG_DEBUG("warden", "RequestTicks %u", _serverTicks); // At request
LOG_DEBUG("warden", "Ticks %u", newClientTicks); // At response
LOG_DEBUG("warden", "Ticks diff %u", ourTicks - newClientTicks);
#endif
}
@@ -533,7 +533,7 @@ void WardenWin::HandleData(ByteBuffer& buff)
if (Mem_Result != 0)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MEM_CHECK not 0x00, CheckId %u account Id %u", checkId, _session->GetAccountId());
LOG_DEBUG("warden", "RESULT MEM_CHECK not 0x00, CheckId %u account Id %u", checkId, _session->GetAccountId());
#endif
checkFailed = checkId;
continue;
@@ -545,7 +545,7 @@ void WardenWin::HandleData(ByteBuffer& buff)
if (memcmp(buff.contents() + buff.rpos(), result.data(), rd->Length) != 0)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MEM_CHECK fail CheckId %u account Id %u", checkId, _session->GetAccountId());
LOG_DEBUG("warden", "RESULT MEM_CHECK fail CheckId %u account Id %u", checkId, _session->GetAccountId());
#endif
checkFailed = checkId;
buff.rpos(buff.rpos() + rd->Length);
@@ -554,7 +554,7 @@ void WardenWin::HandleData(ByteBuffer& buff)
buff.rpos(buff.rpos() + rd->Length);
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MEM_CHECK passed CheckId %u account Id %u", checkId, _session->GetAccountId());
LOG_DEBUG("warden", "RESULT MEM_CHECK passed CheckId %u account Id %u", checkId, _session->GetAccountId());
#endif
break;
}
@@ -568,13 +568,13 @@ void WardenWin::HandleData(ByteBuffer& buff)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (type == PAGE_CHECK_A || type == PAGE_CHECK_B)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT PAGE_CHECK fail, CheckId %u account Id %u", checkId, _session->GetAccountId());
LOG_DEBUG("warden", "RESULT PAGE_CHECK fail, CheckId %u account Id %u", checkId, _session->GetAccountId());
if (type == MODULE_CHECK)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MODULE_CHECK fail, CheckId %u account Id %u", checkId, _session->GetAccountId());
LOG_DEBUG("warden", "RESULT MODULE_CHECK fail, CheckId %u account Id %u", checkId, _session->GetAccountId());
if (type == DRIVER_CHECK)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT DRIVER_CHECK fail, CheckId %u account Id %u", checkId, _session->GetAccountId());
LOG_DEBUG("warden", "RESULT DRIVER_CHECK fail, CheckId %u account Id %u", checkId, _session->GetAccountId());
#endif
checkFailed = checkId;
buff.rpos(buff.rpos() + 1);
@@ -585,11 +585,11 @@ void WardenWin::HandleData(ByteBuffer& buff)
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (type == PAGE_CHECK_A || type == PAGE_CHECK_B)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT PAGE_CHECK passed CheckId %u account Id %u", checkId, _session->GetAccountId());
LOG_DEBUG("warden", "RESULT PAGE_CHECK passed CheckId %u account Id %u", checkId, _session->GetAccountId());
else if (type == MODULE_CHECK)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MODULE_CHECK passed CheckId %u account Id %u", checkId, _session->GetAccountId());
LOG_DEBUG("warden", "RESULT MODULE_CHECK passed CheckId %u account Id %u", checkId, _session->GetAccountId());
else if (type == DRIVER_CHECK)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT DRIVER_CHECK passed CheckId %u account Id %u", checkId, _session->GetAccountId());
LOG_DEBUG("warden", "RESULT DRIVER_CHECK passed CheckId %u account Id %u", checkId, _session->GetAccountId());
#endif
break;
}
@@ -602,7 +602,7 @@ void WardenWin::HandleData(ByteBuffer& buff)
}
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "LUA_EVAL_CHECK CheckId %u account Id %u got in-warden dummy response", checkId, _session->GetAccountId()/* , result */);
LOG_DEBUG("warden", "LUA_EVAL_CHECK CheckId %u account Id %u got in-warden dummy response", checkId, _session->GetAccountId()/* , result */);
#endif
break;
}
@@ -614,7 +614,7 @@ void WardenWin::HandleData(ByteBuffer& buff)
if (Mpq_Result != 0)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MPQ_CHECK not 0x00 account id %u", _session->GetAccountId());
LOG_DEBUG("warden", "RESULT MPQ_CHECK not 0x00 account id %u", _session->GetAccountId());
#endif
checkFailed = checkId;
continue;
@@ -624,7 +624,7 @@ void WardenWin::HandleData(ByteBuffer& buff)
if (memcmp(buff.contents() + buff.rpos(), rs->Result.ToByteArray<20>(false).data(), acore::Crypto::Constants::SHA1_DIGEST_LENGTH_BYTES) != 0) // SHA1
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MPQ_CHECK fail, CheckId %u account Id %u", checkId, _session->GetAccountId());
LOG_DEBUG("warden", "RESULT MPQ_CHECK fail, CheckId %u account Id %u", checkId, _session->GetAccountId());
#endif
checkFailed = checkId;
buff.rpos(buff.rpos() + acore::Crypto::Constants::SHA1_DIGEST_LENGTH_BYTES); // 20 bytes SHA1
@@ -633,7 +633,7 @@ void WardenWin::HandleData(ByteBuffer& buff)
buff.rpos(buff.rpos() + acore::Crypto::Constants::SHA1_DIGEST_LENGTH_BYTES); // 20 bytes SHA1
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MPQ_CHECK passed, CheckId %u account Id %u", checkId, _session->GetAccountId());
LOG_DEBUG("warden", "RESULT MPQ_CHECK passed, CheckId %u account Id %u", checkId, _session->GetAccountId());
#endif
break;
}