Core/Logging: Add Asyncronous logging with Loggers ("What to log") and Appenders ("Where to log") system. Will allow to select to full log some parts of core while others are not even logged.
- Logging System is asyncronous to improve performance.
- Each msg and Logger has a Log Type and Log Level assigned. Each msg is assigned the Logger of same Log Type or "root" Logger is selected if there is no Logger configured for the given Log Type
- Loggers have a list of Appenders to send the msg to. The Msg in the Logger is not sent to Appenders if the msg LogLevel is lower than Logger LogLevel.
- There are three (at the moment) types of Appenders: Console, File or DB (this is WIP, not working ATM). Msg is not written to the resource if msg LogLevel is lower than Appender LogLevel.
- Appender and Console Log levels can be changed while server is active with command '.set loglevel (a/l) name level'
Explanation of use with Sample config:
Appender.Console.Type=1 (1 = Console)
Appender.Console.Level=2 (2 = Debug)
Appender.Server.Type=2 (2 = File)
Appender.Server.Level=3 (3 = Info)
Appender.Server.File=Server.log
Appender.SQL.Type=2 (2 = File)
Appender.SQL.Level=1 (1 = Trace)
Appender.SQL.File=sql.log
Appenders=Console Server (NOTE: SQL has not been included here... that will make core ignore the config for "SQL" as it's not in this list)
Logger.root.Type=0 (0 = Default - if it's not created by config, server will create it with LogLevel = DISABLED)
Logger.root.Level=5 (5 = Error)
Logger.root.Appenders=Console
Logger.SQL.Type=26 (26 = SQL)
Logger.SQL.Level=3 (2 = Debug)
Logger.SQL.Appenders=Console Server SQL
Logger.SomeRandomName.Type=24 (24 = Guild)
Logger.SomeRandomName.Level=5 (5 = Error)
Loggers=root SQL SomeRandomName
* At loading Appender SQL will be ignored, as it's not present on "Appenders"
* sLog->outDebug(LOG_FILTER_GUILD, "Some log msg related to Guilds")
- Msg is sent to Logger of Type LOG_FILTER_GUILD (24). Logger with name SomeRandomName is found but it's LogLevel = 5 and Msg LogLevel=2... Msg is not logged
* sLog->outError(LOG_FILTER_GUILD, "Some error log msg related to Guilds")
- Msg is sent to Logger of Type LOG_FILTER_GUILD (24). Logger with name SomeRandomeName is found with proper LogLevel but Logger does not have any Appenders assigned to that logger... Msg is not logged
* sLog->outDebug(LOG_FILTER_SQL, "Some msg related to SQLs")
- Msg is sent to Logger SQL (matches type), as it matches LogLevel the msg is sent to Appenders Console, Server and SQL
- Appender Console has lower Log Level: Msg is logged to Console
- Appender Server has higher Log Level: Msg is not logged to file
- Appender SQL has lower Log Level: Msg is logged to file sql.log
* sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Some msg related to Battelgrounds")
- Msg is sent to Logger root (Type 0) as no Logger was found with Type LOG_FILTER_BATTLEGROUND (13). As Logger has higher LogLevel msg is not sent to any appender
* sLog->outError(LOG_FILTER_BATTLEGROUND, "Some error msg related to Battelgrounds")
- Msg is sent to Logger root (Type 0) as no Logger was found with Type LOG_FILTER_BATTLEGROUND (13). Msg has lower LogLevel and is sent to Appender Console
- Appender Console has lower LogLevel: Msg is logged to Console
This commit is contained in:
@@ -51,7 +51,7 @@ void Guild::SendCommandResult(WorldSession* session, GuildCommandType type, Guil
|
||||
data << uint32(errCode);
|
||||
session->SendPacket(&data);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_COMMAND_RESULT)");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_COMMAND_RESULT)");
|
||||
}
|
||||
|
||||
void Guild::SendSaveEmblemResult(WorldSession* session, GuildEmblemError errCode)
|
||||
@@ -60,10 +60,9 @@ void Guild::SendSaveEmblemResult(WorldSession* session, GuildEmblemError errCode
|
||||
data << uint32(errCode);
|
||||
session->SendPacket(&data);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (MSG_SAVE_GUILD_EMBLEM)");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (MSG_SAVE_GUILD_EMBLEM)");
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// LogHolder
|
||||
Guild::LogHolder::~LogHolder()
|
||||
{
|
||||
@@ -337,21 +336,21 @@ bool Guild::BankTab::LoadItemFromDB(Field* fields)
|
||||
uint32 itemEntry = fields[15].GetUInt32();
|
||||
if (slotId >= GUILD_BANK_MAX_SLOTS)
|
||||
{
|
||||
sLog->outError("Invalid slot for item (GUID: %u, id: %u) in guild bank, skipped.", itemGuid, itemEntry);
|
||||
sLog->outError(LOG_FILTER_GUILD, "Invalid slot for item (GUID: %u, id: %u) in guild bank, skipped.", itemGuid, itemEntry);
|
||||
return false;
|
||||
}
|
||||
|
||||
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemEntry);
|
||||
if (!proto)
|
||||
{
|
||||
sLog->outError("Unknown item (GUID: %u, id: %u) in guild bank, skipped.", itemGuid, itemEntry);
|
||||
sLog->outError(LOG_FILTER_GUILD, "Unknown item (GUID: %u, id: %u) in guild bank, skipped.", itemGuid, itemEntry);
|
||||
return false;
|
||||
}
|
||||
|
||||
Item* pItem = NewItemOrBag(proto);
|
||||
if (!pItem->LoadFromDB(itemGuid, 0, fields, itemEntry))
|
||||
{
|
||||
sLog->outError("Item (GUID %u, id: %u) not found in item_instance, deleting from guild bank!", itemGuid, itemEntry);
|
||||
sLog->outError(LOG_FILTER_GUILD, "Item (GUID %u, id: %u) not found in item_instance, deleting from guild bank!", itemGuid, itemEntry);
|
||||
|
||||
PreparedStatement *stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_NONEXISTENT_GUILD_BANK_ITEM);
|
||||
stmt->setUInt32(0, m_guildId);
|
||||
@@ -599,7 +598,7 @@ bool Guild::Member::LoadFromDB(Field* fields)
|
||||
|
||||
if (!m_zoneId)
|
||||
{
|
||||
sLog->outError("Player (GUID: %u) has broken zone-data", GUID_LOPART(m_guid));
|
||||
sLog->outError(LOG_FILTER_GUILD, "Player (GUID: %u) has broken zone-data", GUID_LOPART(m_guid));
|
||||
m_zoneId = Player::GetZoneIdFromDB(m_guid);
|
||||
}
|
||||
return true;
|
||||
@@ -610,12 +609,12 @@ bool Guild::Member::CheckStats() const
|
||||
{
|
||||
if (m_level < 1)
|
||||
{
|
||||
sLog->outError("Player (GUID: %u) has a broken data in field `characters`.`level`, deleting him from guild!", GUID_LOPART(m_guid));
|
||||
sLog->outError(LOG_FILTER_GUILD, "Player (GUID: %u) has a broken data in field `characters`.`level`, deleting him from guild!", GUID_LOPART(m_guid));
|
||||
return false;
|
||||
}
|
||||
if (m_class < CLASS_WARRIOR || m_class >= MAX_CLASSES)
|
||||
{
|
||||
sLog->outError("Player (GUID: %u) has a broken data in field `characters`.`class`, deleting him from guild!", GUID_LOPART(m_guid));
|
||||
sLog->outError(LOG_FILTER_GUILD, "Player (GUID: %u) has a broken data in field `characters`.`class`, deleting him from guild!", GUID_LOPART(m_guid));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -1220,7 +1219,7 @@ void Guild::HandleRoster(WorldSession* session /*= NULL*/)
|
||||
session->SendPacket(&data);
|
||||
else
|
||||
BroadcastPacket(&data);
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_ROSTER)");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_ROSTER)");
|
||||
}
|
||||
|
||||
void Guild::HandleQuery(WorldSession* session)
|
||||
@@ -1241,7 +1240,7 @@ void Guild::HandleQuery(WorldSession* session)
|
||||
data << uint32(_GetRanksSize()); // Amount of ranks
|
||||
session->SendPacket(&data);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_QUERY_RESPONSE)");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_QUERY_RESPONSE)");
|
||||
}
|
||||
|
||||
void Guild::HandleSetMOTD(WorldSession* session, const std::string& motd)
|
||||
@@ -1450,7 +1449,7 @@ void Guild::HandleInviteMember(WorldSession* session, const std::string& name)
|
||||
data << m_name;
|
||||
pInvitee->GetSession()->SendPacket(&data);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_INVITE)");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_INVITE)");
|
||||
}
|
||||
|
||||
void Guild::HandleAcceptMember(WorldSession* session)
|
||||
@@ -1723,7 +1722,7 @@ void Guild::SendInfo(WorldSession* session) const
|
||||
data << m_accountsNumber; // Number of accounts
|
||||
|
||||
session->SendPacket(&data);
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_INFO)");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_INFO)");
|
||||
}
|
||||
|
||||
void Guild::SendEventLog(WorldSession* session) const
|
||||
@@ -1773,7 +1772,7 @@ void Guild::SendBankTabsInfo(WorldSession* session) const
|
||||
data << uint8(0); // Do not send tab content
|
||||
session->SendPacket(&data);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_BANK_LIST)");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_BANK_LIST)");
|
||||
}
|
||||
|
||||
void Guild::SendBankTabText(WorldSession* session, uint8 tabId) const
|
||||
@@ -1913,13 +1912,13 @@ bool Guild::LoadBankEventLogFromDB(Field* fields)
|
||||
{
|
||||
if (!isMoneyTab)
|
||||
{
|
||||
sLog->outError("GuildBankEventLog ERROR: MoneyEvent(LogGuid: %u, Guild: %u) does not belong to money tab (%u), ignoring...", guid, m_id, dbTabId);
|
||||
sLog->outError(LOG_FILTER_GUILD, "GuildBankEventLog ERROR: MoneyEvent(LogGuid: %u, Guild: %u) does not belong to money tab (%u), ignoring...", guid, m_id, dbTabId);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (isMoneyTab)
|
||||
{
|
||||
sLog->outError("GuildBankEventLog ERROR: non-money event (LogGuid: %u, Guild: %u) belongs to money tab, ignoring...", guid, m_id);
|
||||
sLog->outError(LOG_FILTER_GUILD, "GuildBankEventLog ERROR: non-money event (LogGuid: %u, Guild: %u) belongs to money tab, ignoring...", guid, m_id);
|
||||
return false;
|
||||
}
|
||||
pLog->LoadEvent(new BankEventLogEntry(
|
||||
@@ -1942,7 +1941,7 @@ bool Guild::LoadBankTabFromDB(Field* fields)
|
||||
uint8 tabId = fields[1].GetUInt8();
|
||||
if (tabId >= _GetPurchasedTabsSize())
|
||||
{
|
||||
sLog->outError("Invalid tab (tabId: %u) in guild bank, skipped.", tabId);
|
||||
sLog->outError(LOG_FILTER_GUILD, "Invalid tab (tabId: %u) in guild bank, skipped.", tabId);
|
||||
return false;
|
||||
}
|
||||
return m_bankTabs[tabId]->LoadFromDB(fields);
|
||||
@@ -1953,7 +1952,7 @@ bool Guild::LoadBankItemFromDB(Field* fields)
|
||||
uint8 tabId = fields[12].GetUInt8();
|
||||
if (tabId >= _GetPurchasedTabsSize())
|
||||
{
|
||||
sLog->outError("Invalid tab for item (GUID: %u, id: #%u) in guild bank, skipped.",
|
||||
sLog->outError(LOG_FILTER_GUILD, "Invalid tab for item (GUID: %u, id: #%u) in guild bank, skipped.",
|
||||
fields[14].GetUInt32(), fields[15].GetUInt32());
|
||||
return false;
|
||||
}
|
||||
@@ -1971,7 +1970,7 @@ bool Guild::Validate()
|
||||
bool broken_ranks = false;
|
||||
if (_GetRanksSize() < GUILD_RANKS_MIN_COUNT || _GetRanksSize() > GUILD_RANKS_MAX_COUNT)
|
||||
{
|
||||
sLog->outError("Guild %u has invalid number of ranks, creating new...", m_id);
|
||||
sLog->outError(LOG_FILTER_GUILD, "Guild %u has invalid number of ranks, creating new...", m_id);
|
||||
broken_ranks = true;
|
||||
}
|
||||
else
|
||||
@@ -1981,7 +1980,7 @@ bool Guild::Validate()
|
||||
RankInfo* rankInfo = GetRankInfo(rankId);
|
||||
if (rankInfo->GetId() != rankId)
|
||||
{
|
||||
sLog->outError("Guild %u has broken rank id %u, creating default set of ranks...", m_id, rankId);
|
||||
sLog->outError(LOG_FILTER_GUILD, "Guild %u has broken rank id %u, creating default set of ranks...", m_id, rankId);
|
||||
broken_ranks = true;
|
||||
}
|
||||
}
|
||||
@@ -2532,7 +2531,7 @@ void Guild::_MoveItems(MoveItemData* pSrc, MoveItemData* pDest, uint32 splitedAm
|
||||
/*
|
||||
if (pItemSrc->GetCount() == 0)
|
||||
{
|
||||
sLog->outCrash("Guild::SwapItems: Player %s(GUIDLow: %u) tried to move item %u from tab %u slot %u to tab %u slot %u, but item %u has a stack of zero!",
|
||||
sLog->outFatal(LOG_FILTER_GENERAL, "Guild::SwapItems: Player %s(GUIDLow: %u) tried to move item %u from tab %u slot %u to tab %u slot %u, but item %u has a stack of zero!",
|
||||
player->GetName(), player->GetGUIDLow(), pItemSrc->GetEntry(), tabId, slotId, destTabId, destSlotId, pItemSrc->GetEntry());
|
||||
//return; // Commented out for now, uncomment when it's verified that this causes a crash!!
|
||||
}
|
||||
@@ -2642,7 +2641,7 @@ void Guild::_SendBankContent(WorldSession* session, uint8 tabId) const
|
||||
|
||||
session->SendPacket(&data);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_BANK_LIST)");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_BANK_LIST)");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2657,7 +2656,7 @@ void Guild::_SendBankMoneyUpdate(WorldSession* session) const
|
||||
data << uint8(0); // No items
|
||||
BroadcastPacket(&data);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_BANK_LIST)");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_BANK_LIST)");
|
||||
}
|
||||
|
||||
void Guild::_SendBankContentUpdate(MoveItemData* pSrc, MoveItemData* pDest) const
|
||||
@@ -2717,7 +2716,7 @@ void Guild::_SendBankContentUpdate(uint8 tabId, SlotIds slots) const
|
||||
player->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_BANK_LIST)");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (SMSG_GUILD_BANK_LIST)");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2741,5 +2740,5 @@ void Guild::_BroadcastEvent(GuildEvents guildEvent, uint64 guid, const char* par
|
||||
|
||||
BroadcastPacket(&data);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_GUILD_EVENT");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent SMSG_GUILD_EVENT");
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ uint32 GuildMgr::GenerateGuildId()
|
||||
{
|
||||
if (NextGuildId >= 0xFFFFFFFE)
|
||||
{
|
||||
sLog->outError("Guild ids overflow!! Can't continue, shutting down server. ");
|
||||
sLog->outError(LOG_FILTER_GUILD, "Guild ids overflow!! Can't continue, shutting down server. ");
|
||||
World::StopNow(ERROR_EXIT_CODE);
|
||||
}
|
||||
return NextGuildId++;
|
||||
@@ -93,7 +93,7 @@ Guild* GuildMgr::GetGuildByLeader(uint64 guid) const
|
||||
void GuildMgr::LoadGuilds()
|
||||
{
|
||||
// 1. Load all guilds
|
||||
sLog->outString("Loading guilds definitions...");
|
||||
sLog->outInfo(LOG_FILTER_GUILD, "Loading guilds definitions...");
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -105,8 +105,8 @@ void GuildMgr::LoadGuilds()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 guild definitions. DB table `guild` is empty.");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild definitions. DB table `guild` is empty.");
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -128,13 +128,13 @@ void GuildMgr::LoadGuilds()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u guild definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 2. Load all guild ranks
|
||||
sLog->outString("Loading guild ranks...");
|
||||
sLog->outInfo(LOG_FILTER_GUILD, "Loading guild ranks...");
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -146,8 +146,8 @@ void GuildMgr::LoadGuilds()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 guild ranks. DB table `guild_rank` is empty.");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild ranks. DB table `guild_rank` is empty.");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -164,13 +164,13 @@ void GuildMgr::LoadGuilds()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u guild ranks in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild ranks in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 3. Load all guild members
|
||||
sLog->outString("Loading guild members...");
|
||||
sLog->outInfo(LOG_FILTER_GUILD, "Loading guild members...");
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -189,8 +189,8 @@ void GuildMgr::LoadGuilds()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 guild members. DB table `guild_member` is empty.");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild members. DB table `guild_member` is empty.");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -208,13 +208,13 @@ void GuildMgr::LoadGuilds()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u guild members int %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild members int %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 4. Load all guild bank tab rights
|
||||
sLog->outString("Loading bank tab rights...");
|
||||
sLog->outInfo(LOG_FILTER_GUILD, "Loading bank tab rights...");
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -226,8 +226,8 @@ void GuildMgr::LoadGuilds()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 guild bank tab rights. DB table `guild_bank_right` is empty.");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild bank tab rights. DB table `guild_bank_right` is empty.");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -244,13 +244,13 @@ void GuildMgr::LoadGuilds()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u bank tab rights in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u bank tab rights in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 5. Load all event logs
|
||||
sLog->outString("Loading guild event logs...");
|
||||
sLog->outInfo(LOG_FILTER_GUILD, "Loading guild event logs...");
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -261,8 +261,8 @@ void GuildMgr::LoadGuilds()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 guild event logs. DB table `guild_eventlog` is empty.");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild event logs. DB table `guild_eventlog` is empty.");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -279,13 +279,13 @@ void GuildMgr::LoadGuilds()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u guild event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 6. Load all bank event logs
|
||||
sLog->outString("Loading guild bank event logs...");
|
||||
sLog->outInfo(LOG_FILTER_GUILD, "Loading guild bank event logs...");
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -297,8 +297,8 @@ void GuildMgr::LoadGuilds()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 guild bank event logs. DB table `guild_bank_eventlog` is empty.");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild bank event logs. DB table `guild_bank_eventlog` is empty.");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -315,13 +315,13 @@ void GuildMgr::LoadGuilds()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u guild bank event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild bank event logs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 7. Load all guild bank tabs
|
||||
sLog->outString("Loading guild bank tabs...");
|
||||
sLog->outInfo(LOG_FILTER_GUILD, "Loading guild bank tabs...");
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -333,8 +333,8 @@ void GuildMgr::LoadGuilds()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 guild bank tabs. DB table `guild_bank_tab` is empty.");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild bank tabs. DB table `guild_bank_tab` is empty.");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -351,13 +351,13 @@ void GuildMgr::LoadGuilds()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u guild bank tabs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild bank tabs in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 8. Fill all guild bank tabs
|
||||
sLog->outString("Filling bank tabs with items...");
|
||||
sLog->outInfo(LOG_FILTER_GUILD, "Filling bank tabs with items...");
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -371,8 +371,8 @@ void GuildMgr::LoadGuilds()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 guild bank tab items. DB table `guild_bank_item` or `item_instance` is empty.");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded 0 guild bank tab items. DB table `guild_bank_item` or `item_instance` is empty.");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -389,13 +389,13 @@ void GuildMgr::LoadGuilds()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u guild bank tab items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GUILD, ">> Loaded %u guild bank tab items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 9. Validate loaded guild data
|
||||
sLog->outString("Validating data of loaded guilds...");
|
||||
sLog->outInfo(LOG_FILTER_GUILD, "Validating data of loaded guilds...");
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -412,7 +412,7 @@ void GuildMgr::LoadGuilds()
|
||||
}
|
||||
}
|
||||
|
||||
sLog->outString(">> Validated data of loaded guilds in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GUILD, ">> Validated data of loaded guilds in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user