diff options
author | Spp <spp@jorge.gr> | 2013-05-13 15:07:36 +0200 |
---|---|---|
committer | Spp <spp@jorge.gr> | 2013-05-13 15:07:36 +0200 |
commit | d1677b2db08f71a5bddedd9659cc5a66f325f47f (patch) | |
tree | afb68e15d84d4e64de9f80b9bbbeb126c4aa8c54 /src/server/game/Handlers/ChatHandler.cpp | |
parent | 243c325ca4323feb4f7f80c0ecd3873c78cbf887 (diff) |
Core/Logging: Performance-related tweaks to logging system
All sLog->out* functions (except outCommand atm) are replaced with TC_LOG_* macros.
Memleak fix
Diffstat (limited to 'src/server/game/Handlers/ChatHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/ChatHandler.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp index b14e9eebf02..68f00a28cf1 100644 --- a/src/server/game/Handlers/ChatHandler.cpp +++ b/src/server/game/Handlers/ChatHandler.cpp @@ -50,14 +50,14 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) if (type >= MAX_CHAT_MSG_TYPE) { - sLog->outError(LOG_FILTER_NETWORKIO, "CHAT: Wrong message type received: %u", type); + TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "CHAT: Wrong message type received: %u", type); recvData.rfinish(); return; } Player* sender = GetPlayer(); - //sLog->outDebug("CHAT: packet received. type %u, lang %u", type, lang); + //TC_LOG_DEBUG("CHAT: packet received. type %u, lang %u", type, lang); // prevent talking at unknown language (cheating) LanguageDesc const* langDesc = GetLanguageDescByID(lang); @@ -114,7 +114,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) return; break; default: - sLog->outError(LOG_FILTER_NETWORKIO, "Player %s (GUID: %u) sent a chatmessage with an invalid language/message type combination", + TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player %s (GUID: %u) sent a chatmessage with an invalid language/message type combination", GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow()); recvData.rfinish(); @@ -225,7 +225,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) if (sWorld->getIntConfig(CONFIG_CHAT_STRICT_LINK_CHECKING_SEVERITY) && !ChatHandler(this).isValidChatMessage(msg.c_str())) { - sLog->outError(LOG_FILTER_NETWORKIO, "Player %s (GUID: %u) sent a chatmessage with an invalid link: %s", GetPlayer()->GetName().c_str(), + TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player %s (GUID: %u) sent a chatmessage with an invalid link: %s", GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow(), msg.c_str()); if (sWorld->getIntConfig(CONFIG_CHAT_STRICT_LINK_CHECKING_KICK)) @@ -481,7 +481,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) break; } default: - sLog->outError(LOG_FILTER_NETWORKIO, "CHAT: unknown message type %u, lang: %u", type, lang); + TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "CHAT: unknown message type %u, lang: %u", type, lang); break; } } @@ -595,7 +595,7 @@ void WorldSession::HandleChatIgnoredOpcode(WorldPacket& recvData) { uint64 iguid; uint8 unk; - //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: Received CMSG_CHAT_IGNORED"); + //TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "WORLD: Received CMSG_CHAT_IGNORED"); recvData >> iguid; recvData >> unk; // probably related to spam reporting @@ -611,7 +611,7 @@ void WorldSession::HandleChatIgnoredOpcode(WorldPacket& recvData) void WorldSession::HandleChannelDeclineInvite(WorldPacket &recvPacket) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); + TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); } void WorldSession::SendPlayerNotFoundNotice(std::string const& name) |