Skip to content

Commit

Permalink
Core/Logging: Move more log messages to LOG_FILTER_SERVER_LOADING
Browse files Browse the repository at this point in the history
  • Loading branch information
xurxogr committed Aug 16, 2012
1 parent 3c42401 commit a566e3e
Show file tree
Hide file tree
Showing 23 changed files with 258 additions and 491 deletions.
28 changes: 14 additions & 14 deletions src/server/authserver/authserver.conf.dist
Expand Up @@ -198,7 +198,7 @@ LoginDatabase.WorkerThreads = 1
# Example: "13 11 9 5 3 1"
#
# File: Name of the file (read as optional1 if Type = File)
# Allows to use one "%u" to create dynamic files
# Allows to use one "%s" to create dynamic files
#
# Mode: Mode to open the file (read as optional2 if Type = File)
# a - (Append)
Expand All @@ -208,19 +208,6 @@ LoginDatabase.WorkerThreads = 1
Appender.Console=1,2,6
Appender.Auth=2,2,7,Auth.log,w

# Logger config values: Given a logger "name"
# Logger.name
# Description: Defines 'What to log'
# Format: Type,LogLevel,AppenderList
# Type
# 0 - Default. Each type that has no config will
# rely on this one. Core will create this logger
# (disabled) if it's not configured
# 7 - Network input/output,
# 30 - Authserver

Logger.Root=0,3,Console Auth

# LogLevel
# 0 - (Disabled)
# 1 - (Trace)
Expand All @@ -240,6 +227,19 @@ Logger.Root=0,3,Console Auth

Appenders=Console Auth

# Logger config values: Given a logger "name"
# Logger.name
# Description: Defines 'What to log'
# Format: Type,LogLevel,AppenderList
# Type
# 0 - Default. Each type that has no config will
# rely on this one. Core will create this logger
# (disabled) if it's not configured
# 7 - Network input/output,
# 30 - Authserver

Logger.Root=0,3,Console Auth

#
# Loggers
# Description: List of Loggers to read from config
Expand Down
36 changes: 12 additions & 24 deletions src/server/game/Achievements/AchievementMgr.cpp
Expand Up @@ -2201,8 +2201,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()

if (sAchievementCriteriaStore.GetNumRows() == 0)
{
sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 achievement criteria.");

sLog->outError(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 achievement criteria.");
return;
}

Expand All @@ -2219,8 +2218,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
m_AchievementCriteriasByTimedType[criteria->timedType].push_back(criteria);
}

sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %lu achievement criteria in %u ms", (unsigned long)m_AchievementCriteriasByType->size(), GetMSTimeDiffToNow(oldMSTime));

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu achievement criteria in %u ms", (unsigned long)m_AchievementCriteriasByType->size(), GetMSTimeDiffToNow(oldMSTime));
}

void AchievementGlobalMgr::LoadAchievementReferenceList()
Expand All @@ -2229,8 +2227,7 @@ void AchievementGlobalMgr::LoadAchievementReferenceList()

if (sAchievementStore.GetNumRows() == 0)
{
sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 achievement references.");

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 achievement references.");
return;
}

Expand All @@ -2250,8 +2247,7 @@ void AchievementGlobalMgr::LoadAchievementReferenceList()
if (AchievementEntry const* achievement = sAchievementStore.LookupEntry(4539))
const_cast<AchievementEntry*>(achievement)->mapID = 631; // Correct map requirement (currently has Ulduar)

sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %u achievement references in %u ms", count, GetMSTimeDiffToNow(oldMSTime));

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u achievement references in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}

void AchievementGlobalMgr::LoadAchievementCriteriaData()
Expand All @@ -2264,8 +2260,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()

if (!result)
{
sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 additional achievement criteria data. DB table `achievement_criteria_data` is empty.");

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 additional achievement criteria data. DB table `achievement_criteria_data` is empty.");
return;
}

Expand Down Expand Up @@ -2396,8 +2391,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` does not have expected data for criteria (Entry: %u Type: %u) for achievement %u.", criteria->ID, criteria->requiredType, criteria->referredAchievement);
}

sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %u additional achievement criteria data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u additional achievement criteria data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}

void AchievementGlobalMgr::LoadCompletedAchievements()
Expand All @@ -2408,8 +2402,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements()

if (!result)
{
sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 completed achievements. DB table `character_achievement` is empty.");

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 completed achievements. DB table `character_achievement` is empty.");
return;
}

Expand All @@ -2436,8 +2429,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
m_allCompletedAchievements.insert(achievementId);
} while (result->NextRow());

sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %lu completed achievements in %u ms", (unsigned long)m_allCompletedAchievements.size(), GetMSTimeDiffToNow(oldMSTime));

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu completed achievements in %u ms", (unsigned long)m_allCompletedAchievements.size(), GetMSTimeDiffToNow(oldMSTime));
}

void AchievementGlobalMgr::LoadRewards()
Expand All @@ -2451,8 +2443,7 @@ void AchievementGlobalMgr::LoadRewards()

if (!result)
{
sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty.");

sLog->outError(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty.");
return;
}

Expand Down Expand Up @@ -2543,8 +2534,7 @@ void AchievementGlobalMgr::LoadRewards()
}
while (result->NextRow());

sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %u achievement rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u achievement rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}

void AchievementGlobalMgr::LoadRewardLocales()
Expand All @@ -2559,8 +2549,7 @@ void AchievementGlobalMgr::LoadRewardLocales()

if (!result)
{
sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 achievement reward locale strings. DB table `locales_achievement_reward` is empty");

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 achievement reward locale strings. DB table `locales_achievement_reward` is empty");
return;
}

Expand All @@ -2586,6 +2575,5 @@ void AchievementGlobalMgr::LoadRewardLocales()
}
} while (result->NextRow());

sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %lu achievement reward locale strings in %u ms", (unsigned long)m_achievementRewardLocales.size(), GetMSTimeDiffToNow(oldMSTime));

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %lu achievement reward locale strings in %u ms", (unsigned long)m_achievementRewardLocales.size(), GetMSTimeDiffToNow(oldMSTime));
}
6 changes: 2 additions & 4 deletions src/server/game/Battlegrounds/ArenaTeamMgr.cpp
Expand Up @@ -101,8 +101,7 @@ void ArenaTeamMgr::LoadArenaTeams()

if (!result)
{
sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded 0 arena teams. DB table `arena_team` is empty!");

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 arena teams. DB table `arena_team` is empty!");
return;
}

Expand Down Expand Up @@ -132,8 +131,7 @@ void ArenaTeamMgr::LoadArenaTeams()
}
while (result->NextRow());

sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded %u arena teams in %u ms", count, GetMSTimeDiffToNow(oldMSTime));

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u arena teams in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}

void ArenaTeamMgr::DistributeArenaPoints()
Expand Down
12 changes: 4 additions & 8 deletions src/server/game/Battlegrounds/BattlegroundMgr.cpp
Expand Up @@ -683,8 +683,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()

if (!result)
{
sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 battlegrounds. DB table `battleground_template` is empty.");

sLog->outError(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 battlegrounds. DB table `battleground_template` is empty.");
return;
}

Expand Down Expand Up @@ -792,8 +791,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
}
while (result->NextRow());

sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded %u battlegrounds in %u ms", count, GetMSTimeDiffToNow(oldMSTime));

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u battlegrounds in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}

void BattlegroundMgr::InitAutomaticArenaPointDistribution()
Expand Down Expand Up @@ -1077,8 +1075,7 @@ void BattlegroundMgr::LoadBattleMastersEntry()

if (!result)
{
sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded 0 battlemaster entries. DB table `battlemaster_entry` is empty!");

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 battlemaster entries. DB table `battlemaster_entry` is empty!");
return;
}

Expand All @@ -1102,8 +1099,7 @@ void BattlegroundMgr::LoadBattleMastersEntry()
}
while (result->NextRow());

sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded %u battlemaster entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u battlemaster entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}

HolidayIds BattlegroundMgr::BGTypeToWeekendHolidayId(BattlegroundTypeId bgTypeId)
Expand Down
54 changes: 33 additions & 21 deletions src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
Expand Up @@ -700,28 +700,40 @@ void BattlegroundWS::Reset()
//call parent's class reset
Battleground::Reset();

m_FlagKeepers[BG_TEAM_ALLIANCE] = 0;
m_FlagKeepers[BG_TEAM_HORDE] = 0;
m_FlagKeepers[BG_TEAM_ALLIANCE] = 0;
m_FlagKeepers[BG_TEAM_HORDE] = 0;

m_DroppedFlagGUID[BG_TEAM_ALLIANCE] = 0;
m_DroppedFlagGUID[BG_TEAM_HORDE] = 0;
_flagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_ON_BASE;
_flagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_ON_BASE;
m_TeamScores[BG_TEAM_ALLIANCE] = 0;
m_TeamScores[BG_TEAM_HORDE] = 0;
bool isBGWeekend = sBattlegroundMgr->IsBGWeekend(GetTypeID());
m_ReputationCapture = (isBGWeekend) ? 45 : 35;
m_HonorWinKills = (isBGWeekend) ? 3 : 1;
m_HonorEndKills = (isBGWeekend) ? 4 : 2;
// For WorldState
_minutesElapsed = 0;
_lastFlagCaptureTeam = 0;

/* Spirit nodes is static at this BG and then not required deleting at BG reset.
if (BgCreatures[WS_SPIRIT_MAIN_ALLIANCE])
DelCreature(WS_SPIRIT_MAIN_ALLIANCE);
if (BgCreatures[WS_SPIRIT_MAIN_HORDE])
DelCreature(WS_SPIRIT_MAIN_HORDE);
*/
m_DroppedFlagGUID[BG_TEAM_HORDE] = 0;

_flagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_ON_BASE;
_flagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_ON_BASE;

m_TeamScores[BG_TEAM_ALLIANCE] = 0;
m_TeamScores[BG_TEAM_HORDE] = 0;

if (sBattlegroundMgr->IsBGWeekend(GetTypeID()))
{
m_ReputationCapture = 45;
m_HonorWinKills = 3;
m_HonorEndKills = 4;
}
else
{
m_ReputationCapture = 35;
m_HonorWinKills = 1;
m_HonorEndKills = 2;
}
_minutesElapsed = 0;
_lastFlagCaptureTeam = 0;
_bothFlagsKept = false;
_flagDebuffState = 0;
_flagSpellForceTimer = 0;
_lastFlagCaptureTeam = 0;
_flagsDropTimer[BG_TEAM_ALLIANCE] = 0;
_flagsDropTimer[BG_TEAM_HORDE] = 0;
_flagsTimer[BG_TEAM_ALLIANCE] = 0;
_flagsTimer[BG_TEAM_HORDE] = 0;
}

void BattlegroundWS::EndBattleground(uint32 winner)
Expand Down
6 changes: 2 additions & 4 deletions src/server/game/DungeonFinding/LFGMgr.cpp
Expand Up @@ -135,8 +135,7 @@ void LFGMgr::LoadRewards()

if (!result)
{
sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 lfg dungeon rewards. DB table `lfg_dungeon_rewards` is empty!");

sLog->outError(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 lfg dungeon rewards. DB table `lfg_dungeon_rewards` is empty!");
return;
}

Expand Down Expand Up @@ -183,8 +182,7 @@ void LFGMgr::LoadRewards()
++count;
} while (result->NextRow());

sLog->outInfo(LOG_FILTER_LFG, ">> Loaded %u lfg dungeon rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u lfg dungeon rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}

void LFGMgr::Update(uint32 diff)
Expand Down
6 changes: 2 additions & 4 deletions src/server/game/Entities/Creature/CreatureGroups.cpp
Expand Up @@ -84,8 +84,7 @@ void FormationMgr::LoadCreatureFormations()

if (!result)
{
sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 creatures in formations. DB table `creature_formations` is empty!");

sLog->outError(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creatures in formations. DB table `creature_formations` is empty!");
return;
}

Expand Down Expand Up @@ -136,8 +135,7 @@ void FormationMgr::LoadCreatureFormations()
}
while (result->NextRow());

sLog->outInfo(LOG_FILTER_UNITS, ">> Loaded %u creatures in formations in %u ms", count, GetMSTimeDiffToNow(oldMSTime));

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creatures in formations in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}

void CreatureGroup::AddMember(Creature* member)
Expand Down
6 changes: 1 addition & 5 deletions src/server/game/Entities/Item/ItemEnchantmentMgr.cpp
Expand Up @@ -70,14 +70,10 @@ void LoadRandomEnchantmentsTable()
++count;
} while (result->NextRow());

sLog->outInfo(LOG_FILTER_PLAYER_ITEMS, ">> Loaded %u Item Enchantment definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u Item Enchantment definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
else
{
sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 Item Enchantment definitions. DB table `item_enchantment_template` is empty.");

}
}

uint32 GetItemEnchantMod(int32 entry)
Expand Down
14 changes: 5 additions & 9 deletions src/server/game/Entities/Transport/Transport.cpp
Expand Up @@ -35,8 +35,7 @@ void MapManager::LoadTransports()

if (!result)
{
sLog->outInfo(LOG_FILTER_TRANSPORTS, ">> Loaded 0 transports. DB table `transports` is empty!");

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 transports. DB table `transports` is empty!");
return;
}

Expand Down Expand Up @@ -66,7 +65,7 @@ void MapManager::LoadTransports()
continue;
}

// sLog->outInfo(LOG_FILTER_TRANSPORTS, "Loading transport %d between %s, %s", entry, name.c_str(), goinfo->name);
// sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading transport %d between %s, %s", entry, name.c_str(), goinfo->name);

std::set<uint32> mapsUsed;

Expand Down Expand Up @@ -121,8 +120,7 @@ void MapManager::LoadTransports()
while (result->NextRow());
}

sLog->outInfo(LOG_FILTER_TRANSPORTS, ">> Loaded %u transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}

void MapManager::LoadTransportNPCs()
Expand All @@ -134,8 +132,7 @@ void MapManager::LoadTransportNPCs()

if (!result)
{
sLog->outInfo(LOG_FILTER_TRANSPORTS, ">> Loaded 0 transport NPCs. DB table `creature_transport` is empty!");

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 transport NPCs. DB table `creature_transport` is empty!");
return;
}

Expand Down Expand Up @@ -166,8 +163,7 @@ void MapManager::LoadTransportNPCs()
}
while (result->NextRow());

sLog->outInfo(LOG_FILTER_TRANSPORTS, ">> Loaded %u transport npcs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));

sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u transport npcs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}

Transport::Transport(uint32 period, uint32 script) : GameObject(), m_pathTime(0), m_timer(0),
Expand Down

2 comments on commit a566e3e

@joschiwald
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Spp- you should restore extended arenalog in conf

#
#    ArenaLog.ExtendedInfo
#        Description: Include extended info to ArenaLogFile for each player after rated arena
#                     matches (guid, name, team, IP, healing/damage done, killing blows).
#        Default:     0 - (Disabled)
#                     1 - (Enabled)

ArenaLog.ExtendedInfo = 0

@Krepton
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need add GM logs in DB and File :)

Please sign in to comment.