Core/Log: Implement log masks for debug log level, to allow selective debug output. Update your worldserver.conf.

This commit is contained in:
Machiavelli
2011-02-20 20:16:34 +01:00
parent 45db1591a4
commit e07e20ffca
99 changed files with 1046 additions and 1092 deletions
@@ -144,7 +144,7 @@ void BattlegroundMgr::Update(uint32 diff)
if (m_NextRatingDiscardUpdate < diff)
{
// forced update for rated arenas (scan all, but skipped non rated)
sLog->outDebug("BattlegroundMgr: UPDATING ARENA QUEUES");
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BattlegroundMgr: UPDATING ARENA QUEUES");
for (int qtype = BATTLEGROUND_QUEUE_2v2; qtype <= BATTLEGROUND_QUEUE_5v5; ++qtype)
for (int bracket = BG_BRACKET_ID_FIRST; bracket < MAX_BATTLEGROUND_BRACKETS; ++bracket)
m_BattlegroundQueues[qtype].Update(
@@ -189,7 +189,7 @@ void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket *data, Battlegro
*data << uint32(QueueSlot); // queue id (0...1) - player can be in 2 queues in time
// The following segment is read as uint64 in client but can be appended as their original type.
*data << uint8(arenatype);
sLog->outDebug("BattlegroundMgr::BuildBattlegroundStatusPacket: arenatype = %u for bg instanceID %u, TypeID %u.", arenatype, bg->GetClientInstanceID(), bg->GetTypeID());
sLog->outDebug(LOG_FILTER_NETWORKIO, "BattlegroundMgr::BuildBattlegroundStatusPacket: arenatype = %u for bg instanceID %u, TypeID %u.", arenatype, bg->GetClientInstanceID(), bg->GetTypeID());
*data << uint8(bg->isArena() ? 0xC : 0x2);
*data << uint32(bg->GetTypeID());
*data << uint16(0x1F90);
@@ -245,7 +245,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg)
*data << uint32(pointsLost); // Rating Lost
*data << uint32(pointsGained); // Rating gained
*data << uint32(MatchmakerRating); // Matchmaking Value
sLog->outDebug("rating change: %d", bg->m_ArenaTeamRatingChanges[i]);
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "rating change: %d", bg->m_ArenaTeamRatingChanges[i]);
}
for (int8 i = 1; i >= 0; --i)
{
@@ -380,7 +380,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg)
*data << uint32(0);
break;
default:
sLog->outDebug("Unhandled MSG_PVP_LOG_DATA for BG id %u", bg->GetTypeID());
sLog->outDebug(LOG_FILTER_NETWORKIO, "Unhandled MSG_PVP_LOG_DATA for BG id %u", bg->GetTypeID());
*data << uint32(0);
break;
}
@@ -801,15 +801,15 @@ void BattlegroundMgr::InitAutomaticArenaPointDistribution()
time_t wstime = time_t(sWorld->getWorldState(WS_ARENA_DISTRIBUTION_TIME));
time_t curtime = time(NULL);
sLog->outDebug("Initializing Automatic Arena Point Distribution");
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Initializing Automatic Arena Point Distribution");
if (wstime < curtime)
{
m_NextAutoDistributionTime = curtime; // reset will be called in the next update
sLog->outDebug("Battleground: Next arena point distribution time in the past, reseting it now.");
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: Next arena point distribution time in the past, reseting it now.");
}
else
m_NextAutoDistributionTime = wstime;
sLog->outDebug("Automatic Arena Point Distribution initialized.");
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Automatic Arena Point Distribution initialized.");
}
void BattlegroundMgr::DistributeArenaPoints()