From e6ad26f03c033c49f4140211ae37c403d44901a6 Mon Sep 17 00:00:00 2001 From: SecretsOTheP Date: Sun, 7 Jul 2013 21:44:31 -0700 Subject: [PATCH] Logfile cleanups. See changelog.txt. --- changelog.txt | 9 +++++++++ common/EQStream.cpp | 2 +- zone/client_packet.cpp | 6 ++---- zone/zoning.cpp | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/changelog.txt b/changelog.txt index 74f7b54de..b06464786 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,14 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 07/08/2013 == +Secrets: Cleanup of some log functions that did not have an 'off' function.** +Secrets: Unknown opcode messages only show on EQDEBUG* >= 5 or higher now. (including the dumped packet) + +*NOTE: We recommend for debugging and feature development that you keep EQDEBUG to 5 or higher. For production environments, we recommend 1 to help with CPU performance on windows machines and disk I/O on all platforms. +**Affected filters: +NET__ERROR +NET__DEBUG + == 07/05/2013 == KLS: Added some lua functions KLS: Fixed some lua functions diff --git a/common/EQStream.cpp b/common/EQStream.cpp index 2194cdb1a..1f5d0ea03 100644 --- a/common/EQStream.cpp +++ b/common/EQStream.cpp @@ -986,7 +986,7 @@ EQRawApplicationPacket *p=nullptr; EmuOpcode emu_op = (*OpMgr)->EQToEmu(p->opcode); #if EQDEBUG >= 4 if(emu_op == OP_Unknown) { - LogFile->write(EQEMuLog::Debug, "Unable to convert EQ opcode 0x%.4x to an Application opcode.", p->opcode); + _log(NET__ERROR, "Unable to convert EQ opcode 0x%.4x to an Application opcode.", p->opcode); } #endif p->SetOpcode(emu_op); diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index abd0f3107..9d0b11957 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -446,6 +446,7 @@ int Client::HandlePacket(const EQApplicationPacket *app) ClientPacketProc p; p = ConnectedOpcodes[opcode]; if(p == nullptr) { +#if (EQDEBUG>=5) char buffer[64]; app->build_header_dump(buffer); mlog(CLIENT__NET_ERR, "Unhandled incoming opcode: %s", buffer); @@ -455,6 +456,7 @@ int Client::HandlePacket(const EQApplicationPacket *app) std::cout << "Dump limited to 1000 characters:\n"; DumpPacket(app->pBuffer, 1000); } +#endif break; } @@ -8548,8 +8550,6 @@ void Client::Handle_OP_FindPersonRequest(const EQApplicationPacket *app) FindPersonRequest_Struct* t = (FindPersonRequest_Struct*)app->pBuffer; std::vector points; - - Message(13, "Searched for NPC ID: %d\n", t->npc_id); Mob* target = entity_list.GetMob(t->npc_id); if(target == nullptr) { @@ -8564,8 +8564,6 @@ void Client::Handle_OP_FindPersonRequest(const EQApplicationPacket *app) Message(15, "Moving you to Trader %s", target->GetName()); MovePC(zone->GetZoneID(), zone->GetInstanceID(), target->GetX(), target->GetY(), target->GetZ() , 0.0f); } - else - Message(13, "Found NPC '%s'\n", target->GetName()); if(!RuleB(Pathing, Find) || !zone->pathing) { diff --git a/zone/zoning.cpp b/zone/zoning.cpp index b424e077a..ecd9c5ab7 100644 --- a/zone/zoning.cpp +++ b/zone/zoning.cpp @@ -642,7 +642,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z safe_delete(outapp); } - LogFile->write(EQEMuLog::Debug, "Player %s has requested a zoning to LOC x=%f, y=%f, z=%f, heading=%f in zoneid=%i", GetName(), x, y, z, heading, zoneID); + _log(NET__DEBUG, "Player %s has requested a zoning to LOC x=%f, y=%f, z=%f, heading=%f in zoneid=%i", GetName(), x, y, z, heading, zoneID); //Clear zonesummon variables if we're zoning to our own zone //Client wont generate a zone change packet to the server in this case so //They aren't needed and it keeps behavior on next zone attempt from being undefined.