refactor(Core/Logging): switch to fmt style for LOG_ (#10366)

* feat(Core/Common): add support fmt style for ASSERT and ABORT

* correct CheckCompactArrayMaskOverflow

* 1

* Update src/server/game/Spells/Spell.cpp

* rework logging

* add fmt replace logs

* logging

* FMT_LOG_

* settings

* fix startup

* 1

* 2

* 3

* 4

* 5

* fmt::print

* to fmt
This commit is contained in:
Kargatum
2022-01-27 22:44:41 +07:00
committed by GitHub
parent 5228d29379
commit 5969df4e30
211 changed files with 3689 additions and 3842 deletions

View File

@@ -66,14 +66,14 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
if (type >= MAX_CHAT_MSG_TYPE)
{
LOG_ERROR("network.opcode", "CHAT: Wrong message type received: %u", type);
LOG_ERROR("network.opcode", "CHAT: Wrong message type received: {}", type);
recvData.rfinish();
return;
}
if (lang == LANG_UNIVERSAL && type != CHAT_MSG_AFK && type != CHAT_MSG_DND)
{
LOG_ERROR("entities.player.cheat", "CMSG_MESSAGECHAT: Possible hacking-attempt: %s tried to send a message in universal language", GetPlayerInfo().c_str());
LOG_ERROR("entities.player.cheat", "CMSG_MESSAGECHAT: Possible hacking-attempt: {} tried to send a message in universal language", GetPlayerInfo());
SendNotification(LANG_UNKNOWN_LANGUAGE);
recvData.rfinish();
return;
@@ -187,8 +187,8 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
}
break;
default:
LOG_ERROR("network", "Player %s (%s) sent a chatmessage with an invalid language/message type combination",
GetPlayer()->GetName().c_str(), GetPlayer()->GetGUID().ToString().c_str());
LOG_ERROR("network", "Player {} ({}) sent a chatmessage with an invalid language/message type combination",
GetPlayer()->GetName(), GetPlayer()->GetGUID().ToString());
recvData.rfinish();
return;
@@ -324,8 +324,8 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
{
if (isNasty(c))
{
LOG_ERROR("network", "Player %s %s sent a message containing invalid character %u - blocked", GetPlayer()->GetName().c_str(),
GetPlayer()->GetGUID().ToString().c_str(), uint8(c));
LOG_ERROR("network", "Player {} {} sent a message containing invalid character {} - blocked", GetPlayer()->GetName(),
GetPlayer()->GetGUID().ToString(), uint8(c));
return;
}
}
@@ -666,7 +666,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
break;
}
default:
LOG_ERROR("network.opcode", "CHAT: unknown message type %u, lang: %u", type, lang);
LOG_ERROR("network.opcode", "CHAT: unknown message type {}, lang: {}", type, lang);
break;
}
}
@@ -810,7 +810,7 @@ void WorldSession::HandleChannelDeclineInvite(WorldPacket& recvPacket)
// used only with EXTRA_LOGS
(void)recvPacket;
LOG_DEBUG("network", "Opcode %u", recvPacket.GetOpcode());
LOG_DEBUG("network", "Opcode {}", recvPacket.GetOpcode());
}
void WorldSession::SendPlayerNotFoundNotice(std::string const& name)