mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
chore(Core/Logging): replace most server loggers (#5726)
* chore(Core/Logging): replace most server loggers Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
@@ -96,9 +96,7 @@ void Channel::UpdateChannelInDB() const
|
||||
stmt->setUInt32(2, _channelDBId);
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "Channel(%s) updated in database", _name.c_str());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -696,9 +694,7 @@ void Channel::List(Player const* player)
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("chat.system", "SMSG_CHANNEL_LIST %s Channel: %s", player->GetSession()->GetPlayerInfo().c_str(), GetName().c_str());
|
||||
#endif
|
||||
WorldPacket data(SMSG_CHANNEL_LIST, 1 + (GetName().size() + 1) + 1 + 4 + playersStore.size() * (8 + 1));
|
||||
data << uint8(1); // channel type?
|
||||
data << GetName(); // channel name
|
||||
|
||||
@@ -42,7 +42,7 @@ void ChannelMgr::LoadChannels()
|
||||
QueryResult result = CharacterDatabase.PQuery("SELECT channelId, name, team, announce, ownership, password FROM channels ORDER BY channelId ASC");
|
||||
if (!result)
|
||||
{
|
||||
LOG_INFO("server", ">> Loaded 0 channels. DB table `channels` is empty.");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 channels. DB table `channels` is empty.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ void ChannelMgr::LoadChannels()
|
||||
std::wstring channelWName;
|
||||
if (!Utf8toWStr(channelName, channelWName))
|
||||
{
|
||||
LOG_ERROR("server", "Failed to load channel '%s' from database - invalid utf8 sequence? Deleted.", channelName.c_str());
|
||||
LOG_ERROR("server.loading", "Failed to load channel '%s' from database - invalid utf8 sequence? Deleted.", channelName.c_str());
|
||||
toDelete.push_back({ channelName, team });
|
||||
continue;
|
||||
}
|
||||
@@ -67,7 +67,7 @@ void ChannelMgr::LoadChannels()
|
||||
ChannelMgr* mgr = forTeam(team);
|
||||
if (!mgr)
|
||||
{
|
||||
LOG_ERROR("server", "Failed to load custom chat channel '%s' from database - invalid team %u. Deleted.", channelName.c_str(), team);
|
||||
LOG_ERROR("server.loading", "Failed to load custom chat channel '%s' from database - invalid team %u. Deleted.", channelName.c_str(), team);
|
||||
toDelete.push_back({ channelName, team });
|
||||
continue;
|
||||
}
|
||||
@@ -100,8 +100,8 @@ void ChannelMgr::LoadChannels()
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u channels in %ums", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u channels in %ums", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
Channel* ChannelMgr::GetJoinChannel(std::string const& name, uint32 channelId)
|
||||
@@ -157,8 +157,8 @@ void ChannelMgr::LoadChannelRights()
|
||||
QueryResult result = CharacterDatabase.Query("SELECT name, flags, speakdelay, joinmessage, delaymessage, moderators FROM channels_rights");
|
||||
if (!result)
|
||||
{
|
||||
LOG_INFO("server", ">> Loaded 0 Channel Rights!");
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 Channel Rights!");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -184,8 +184,8 @@ void ChannelMgr::LoadChannelRights()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server", ">> Loaded %d Channel Rights in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %d Channel Rights in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
const ChannelRights& ChannelMgr::GetChannelRightsFor(const std::string& name)
|
||||
|
||||
Reference in New Issue
Block a user