mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
More log migrations to fmt / log aliases
This commit is contained in:
+3
-3
@@ -47,7 +47,7 @@ ChatChannel::ChatChannel(std::string inName, std::string inOwner, std::string in
|
||||
|
||||
Moderated = false;
|
||||
|
||||
Log(Logs::Detail, Logs::UCSServer, "New ChatChannel created: Name: [%s], Owner: [%s], Password: [%s], MinStatus: %i",
|
||||
LogInfo("New ChatChannel created: Name: [[{}]], Owner: [[{}]], Password: [[{}]], MinStatus: [{}]",
|
||||
Name.c_str(), Owner.c_str(), Password.c_str(), MinimumStatus);
|
||||
|
||||
}
|
||||
@@ -402,7 +402,7 @@ void ChatChannel::SendMessageToChannel(std::string Message, Client* Sender) {
|
||||
|
||||
if(ChannelClient)
|
||||
{
|
||||
Log(Logs::Detail, Logs::UCSServer, "Sending message to %s from %s",
|
||||
LogInfo("Sending message to [{}] from [{}]",
|
||||
ChannelClient->GetName().c_str(), Sender->GetName().c_str());
|
||||
|
||||
if (cv_messages[static_cast<uint32>(ChannelClient->GetClientVersion())].length() == 0) {
|
||||
@@ -581,7 +581,7 @@ void ChatChannelList::Process() {
|
||||
|
||||
if(CurrentChannel && CurrentChannel->ReadyToDelete()) {
|
||||
|
||||
Log(Logs::Detail, Logs::UCSServer, "Empty temporary password protected channel %s being destroyed.",
|
||||
LogInfo("Empty temporary password protected channel [{}] being destroyed",
|
||||
CurrentChannel->GetName().c_str());
|
||||
|
||||
RemoveChannel(CurrentChannel);
|
||||
|
||||
+12
-15
@@ -304,7 +304,7 @@ static void ProcessMailTo(Client *c, std::string MailMessage) {
|
||||
|
||||
if (!database.SendMail(Recipient, c->MailBoxName(), Subject, Body, RecipientsString)) {
|
||||
|
||||
Log(Logs::Detail, Logs::UCSServer, "Failed in SendMail(%s, %s, %s, %s)", Recipient.c_str(),
|
||||
LogInfo("Failed in SendMail([{}], [{}], [{}], [{}])", Recipient.c_str(),
|
||||
c->MailBoxName().c_str(), Subject.c_str(), RecipientsString.c_str());
|
||||
|
||||
int PacketLength = 10 + Recipient.length() + Subject.length();
|
||||
@@ -573,7 +573,7 @@ void Clientlist::CheckForStaleConnections(Client *c) {
|
||||
|
||||
in.s_addr = (*Iterator)->ClientStream->GetRemoteIP();
|
||||
|
||||
Log(Logs::Detail, Logs::UCSServer, "Client connection from %s:%d closed.", inet_ntoa(in),
|
||||
LogInfo("Client connection from [{}]:[{}] closed", inet_ntoa(in),
|
||||
ntohs((*Iterator)->ClientStream->GetRemotePort()));
|
||||
|
||||
safe_delete((*Iterator));
|
||||
@@ -592,7 +592,7 @@ void Clientlist::Process()
|
||||
struct in_addr in;
|
||||
in.s_addr = (*it)->ClientStream->GetRemoteIP();
|
||||
|
||||
Log(Logs::Detail, Logs::UCSServer, "Client connection from %s:%d closed.", inet_ntoa(in),
|
||||
LogInfo("Client connection from [{}]:[{}] closed", inet_ntoa(in),
|
||||
ntohs((*it)->ClientStream->GetRemotePort()));
|
||||
|
||||
safe_delete((*it));
|
||||
@@ -618,8 +618,7 @@ void Clientlist::Process()
|
||||
VARSTRUCT_DECODE_STRING(MailBox, PacketBuffer);
|
||||
|
||||
if (strlen(PacketBuffer) != 9) {
|
||||
Log(Logs::Detail, Logs::UCSServer,
|
||||
"Mail key is the wrong size. Version of world incompatible with UCS.");
|
||||
LogInfo("Mail key is the wrong size. Version of world incompatible with UCS.");
|
||||
KeyValid = false;
|
||||
break;
|
||||
}
|
||||
@@ -640,12 +639,11 @@ void Clientlist::Process()
|
||||
else
|
||||
CharacterName = MailBoxString.substr(LastPeriod + 1);
|
||||
|
||||
Log(Logs::Detail, Logs::UCSServer, "Received login for user %s with key %s",
|
||||
LogInfo("Received login for user [{}] with key [{}]",
|
||||
MailBox, Key);
|
||||
|
||||
if (!database.VerifyMailKey(CharacterName, (*it)->ClientStream->GetRemoteIP(), Key)) {
|
||||
Log(Logs::Detail, Logs::UCSServer,
|
||||
"Chat Key for %s does not match, closing connection.", MailBox);
|
||||
LogError("Chat Key for %s does not match, closing connection.", MailBox);
|
||||
KeyValid = false;
|
||||
break;
|
||||
}
|
||||
@@ -680,10 +678,9 @@ void Clientlist::Process()
|
||||
struct in_addr in;
|
||||
in.s_addr = (*it)->ClientStream->GetRemoteIP();
|
||||
|
||||
Log(Logs::Detail, Logs::UCSServer,
|
||||
"Force disconnecting client: %s:%d, KeyValid=%i, GetForceDisconnect()=%i",
|
||||
inet_ntoa(in), ntohs((*it)->ClientStream->GetRemotePort()), KeyValid,
|
||||
(*it)->GetForceDisconnect());
|
||||
LogInfo("Force disconnecting client: [{}]:[{}], KeyValid=[{}], GetForceDisconnect()=[{}]",
|
||||
inet_ntoa(in), ntohs((*it)->ClientStream->GetRemotePort()), KeyValid,
|
||||
(*it)->GetForceDisconnect());
|
||||
|
||||
(*it)->ClientStream->Close();
|
||||
|
||||
@@ -1392,7 +1389,7 @@ void Client::SendChannelMessageByNumber(std::string Message) {
|
||||
}
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::UCSServer, "%s tells %s, [%s]", GetName().c_str(), RequiredChannel->GetName().c_str(),
|
||||
LogInfo("[{}] tells [{}], [[{}]]", GetName().c_str(), RequiredChannel->GetName().c_str(),
|
||||
Message.substr(MessageStart + 1).c_str());
|
||||
|
||||
if (RuleB(Chat, EnableAntiSpam))
|
||||
@@ -2353,13 +2350,13 @@ std::string Client::MailBoxName() {
|
||||
|
||||
if ((Characters.empty()) || (CurrentMailBox > (Characters.size() - 1)))
|
||||
{
|
||||
Log(Logs::Detail, Logs::UCSServer, "MailBoxName() called with CurrentMailBox set to %i and Characters.size() is %i",
|
||||
LogInfo("MailBoxName() called with CurrentMailBox set to [{}] and Characters.size() is [{}]",
|
||||
CurrentMailBox, Characters.size());
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::UCSServer, "MailBoxName() called with CurrentMailBox set to %i and Characters.size() is %i",
|
||||
LogInfo("MailBoxName() called with CurrentMailBox set to [{}] and Characters.size() is [{}]",
|
||||
CurrentMailBox, Characters.size());
|
||||
|
||||
return Characters[CurrentMailBox].Name;
|
||||
|
||||
+1
-1
@@ -213,7 +213,7 @@ int Database::FindCharacter(const char *characterName)
|
||||
safe_delete_array(safeCharName);
|
||||
|
||||
if (results.RowCount() != 1) {
|
||||
Log(Logs::Detail, Logs::UCSServer, "Bad result from FindCharacter query for character %s",
|
||||
LogInfo("Bad result from FindCharacter query for character [{}]",
|
||||
characterName);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user