Core/Logging: Added documentation about this system

- Restored old CharDump (LOG_FILTER_PLAYER_DUMP) but disabled by default.
- "%s" is now used to set dynamic file names, only used by GM commands and Player dump
This commit is contained in:
Spp
2012-08-15 19:58:02 +02:00
parent b77d88ec51
commit 52a5991c12
8 changed files with 325 additions and 18 deletions
@@ -719,11 +719,15 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
sScriptMgr->OnPlayerDelete(guid);
sWorld->DeleteCharaceterNameData(GUID_LOPART(guid));
if (sLog->ShouldLog(LOG_FILTER_CHARACTER, LOG_LEVEL_DEBUG)) // optimize GetPlayerDump call
if (sLog->ShouldLog(LOG_FILTER_PLAYER_DUMP, LOG_LEVEL_INFO)) // optimize GetPlayerDump call
{
std::string dump;
if (PlayerDumpWriter().GetDump(GUID_LOPART(guid), dump))
sLog->outDebug(LOG_FILTER_CHARACTER, dump.c_str(), GetAccountId(), GUID_LOPART(guid), name.c_str());
{
std::ostringstream ss;
ss << GetAccountId() << '_' << name.c_str();
sLog->outCharDump(ss.str().c_str(), dump.c_str(), GetAccountId(), GUID_LOPART(guid), name.c_str());
}
}
Player::DeleteFromDB(guid, GetAccountId());