changed DISABLED_ cmake variable to ENABLED_ and implemented for all disabled logs

This commit is contained in:
Yehonal
2017-08-19 19:42:48 +02:00
parent f888e8c86b
commit c1586e0d99
109 changed files with 3620 additions and 1228 deletions
+30 -10
View File
@@ -193,8 +193,12 @@ void WorldSession::SendPacket(WorldPacket const* packet)
{
uint64 minTime = uint64(cur_time - lastTime);
uint64 fullTime = uint64(lastTime - firstTime);
;//sLog->outDetail("Send all time packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f time: %u", sendPacketCount, sendPacketBytes, float(sendPacketCount)/fullTime, float(sendPacketBytes)/fullTime, uint32(fullTime));
;//sLog->outDetail("Send last min packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f", sendLastPacketCount, sendLastPacketBytes, float(sendLastPacketCount)/minTime, float(sendLastPacketBytes)/minTime);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDetail("Send all time packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f time: %u", sendPacketCount, sendPacketBytes, float(sendPacketCount)/fullTime, float(sendPacketBytes)/fullTime, uint32(fullTime));
#endif
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDetail("Send last min packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f", sendLastPacketCount, sendLastPacketBytes, float(sendLastPacketCount)/minTime, float(sendLastPacketBytes)/minTime);
#endif
lastTime = cur_time;
sendLastPacketCount = 1;
@@ -543,7 +547,9 @@ void WorldSession::LogoutPlayer(bool save)
//! Client will respond by sending 3x CMSG_CANCEL_TRADE, which we currently dont handle
WorldPacket data(SMSG_LOGOUT_COMPLETE, 0);
SendPacket(&data);
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "SESSION: Sent SMSG_LOGOUT_COMPLETE Message");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "SESSION: Sent SMSG_LOGOUT_COMPLETE Message");
#endif
//! Since each account can only have one online character at any given time, ensure all characters for active account are marked as offline
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ACCOUNT_ONLINE);
@@ -969,7 +975,9 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
addonInfo >> enabled >> crc >> unk1;
;//sLog->outDetail("ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk1);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDetail("ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk1);
#endif
AddonInfo addon(addonName, enabled, crc, 2, true);
@@ -982,15 +990,21 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
match = false;
if (!match)
;//sLog->outDetail("ADDON: %s was known, but didn't match known CRC (0x%x)!", addon.Name.c_str(), savedAddon->CRC);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDetail("ADDON: %s was known, but didn't match known CRC (0x%x)!", addon.Name.c_str(), savedAddon->CRC);
#endif
else
;//sLog->outDetail("ADDON: %s was known, CRC is correct (0x%x)", addon.Name.c_str(), savedAddon->CRC);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDetail("ADDON: %s was known, CRC is correct (0x%x)", addon.Name.c_str(), savedAddon->CRC);
#endif
}
else
{
AddonMgr::SaveAddon(addon);
;//sLog->outDetail("ADDON: %s (0x%x) was not known, saving...", addon.Name.c_str(), addon.CRC);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDetail("ADDON: %s (0x%x) was not known, saving...", addon.Name.c_str(), addon.CRC);
#endif
}
// TODO: Find out when to not use CRC/pubkey, and other possible states.
@@ -999,10 +1013,14 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
uint32 currentTime;
addonInfo >> currentTime;
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "ADDON: CurrentTime: %u", currentTime);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "ADDON: CurrentTime: %u", currentTime);
#endif
//if (addonInfo.rpos() != addonInfo.size())
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "packet under-read!");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "packet under-read!");
#endif
}
else
sLog->outError("Addon packet uncompress error!");
@@ -1044,7 +1062,9 @@ void WorldSession::SendAddonsInfo()
data << uint8(usepk);
if (usepk) // if CRC is wrong, add public key (client need it)
{
;//sLog->outDetail("ADDON: CRC (0x%x) for addon %s is wrong (does not match expected 0x%x), sending pubkey",
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDetail("ADDON: CRC (0x%x) for addon %s is wrong (does not match expected 0x%x), sending pubkey",
#endif
// itr->CRC, itr->Name.c_str(), STANDARD_ADDON_CRC);
data.append(addonPublicKey, sizeof(addonPublicKey));