From 9e3f9f97497e63c6ce95312384cba96946cd2e82 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 7 Sep 2019 01:59:50 -0500 Subject: [PATCH] More logging changes [skip ci] --- world/client.cpp | 8 +++----- world/cliententry.cpp | 23 +++++++++++++---------- world/net.cpp | 2 +- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/world/client.cpp b/world/client.cpp index fc8388748..e8916c87f 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -443,9 +443,7 @@ bool Client::HandleSendLoginInfoPacket(const EQApplicationPacket *app) // Could use a Logging Out Completely message somewhere. cle->SetOnline(CLE_Status::CharSelect); - Log(Logs::General, Logs::WorldServer, - "Account (%s) Logging(%s) to character select :: LSID: %d ", - cle->AccountName(), inout, cle->LSID()); + LogInfo("Account ({}) Logging({}) to character select :: LSID [{}] ",cle->AccountName(), inout, cle->LSID()); } else { cle->SetOnline(); @@ -1200,8 +1198,8 @@ void Client::EnterWorld(bool TryBootup) { cle->SetChar(charid, char_name); database.UpdateLiveChar(char_name, GetAccountID()); - Log(Logs::General, Logs::WorldServer, - "(%s) %s %s (Zone ID %d: Instance ID: %d) ", + LogInfo(, + "({}) [{}] [{}] (Zone ID [{}]: Instance ID: [{}]) ", char_name, (seen_character_select ? "Zoning from character select" : "Zoning to"), zone_name, diff --git a/world/cliententry.cpp b/world/cliententry.cpp index 6e2c95018..246172082 100644 --- a/world/cliententry.cpp +++ b/world/cliententry.cpp @@ -83,8 +83,8 @@ ClientListEntry::ClientListEntry( memset(pLFGComments, 0, 64); } -ClientListEntry::ClientListEntry(uint32 in_id, ZoneServer* iZS, ServerClientList_Struct* scl, CLE_Status iOnline) -: id(in_id) +ClientListEntry::ClientListEntry(uint32 in_id, ZoneServer *iZS, ServerClientList_Struct *scl, CLE_Status iOnline) + : id(in_id) { ClearVars(true); @@ -129,7 +129,8 @@ void ClientListEntry::SetChar(uint32 iCharID, const char *iCharName) strn0cpy(pname, iCharName, sizeof(pname)); } -void ClientListEntry::SetOnline(ZoneServer* iZS, CLE_Status iOnline) { +void ClientListEntry::SetOnline(ZoneServer *iZS, CLE_Status iOnline) +{ if (iZS == this->Server()) { SetOnline(iOnline); } @@ -137,12 +138,12 @@ void ClientListEntry::SetOnline(ZoneServer* iZS, CLE_Status iOnline) { void ClientListEntry::SetOnline(CLE_Status iOnline) { - Log(Logs::General, - Logs::WorldServer, - "ClientListEntry::SetOnline for %s(%i) = %i", + LogInfo( + "ClientListEntry::SetOnline for {}({}) = {}", AccountName(), AccountID(), - iOnline); + iOnline + ); if (iOnline >= CLE_Status::Online && pOnline < CLE_Status::Online) { numplayers++; @@ -193,7 +194,8 @@ void ClientListEntry::LSZoneChange(ZoneToZone_Struct *ztz) } } -void ClientListEntry::Update(ZoneServer* iZS, ServerClientList_Struct* scl, CLE_Status iOnline) { +void ClientListEntry::Update(ZoneServer *iZS, ServerClientList_Struct *scl, CLE_Status iOnline) +{ if (pzoneserver != iZS) { if (pzoneserver) { pzoneserver->RemovePlayer(); @@ -259,7 +261,7 @@ void ClientListEntry::ClearVars(bool iAll) { if (iAll) { pOnline = CLE_Status::Never; - stale = 0; + stale = 0; pLSID = 0; memset(loginserver_account_name, 0, sizeof(loginserver_account_name)); @@ -307,8 +309,9 @@ bool ClientListEntry::CheckStale() { stale++; if (stale > 20) { - if (pOnline > CLE_Status::Offline) + if (pOnline > CLE_Status::Offline) { SetOnline(CLE_Status::Offline); + } return true; } diff --git a/world/net.cpp b/world/net.cpp index 90e842008..ebf6062e3 100644 --- a/world/net.cpp +++ b/world/net.cpp @@ -546,7 +546,7 @@ int main(int argc, char** argv) { eqsm.OnNewConnection([&stream_identifier](std::shared_ptr stream) { stream_identifier.AddStream(stream); - LogF(Logs::Detail, Logs::WorldServer, "New connection from IP {0}:{1}", stream->GetRemoteIP(), ntohs(stream->GetRemotePort())); + LogInfo("New connection from IP {0}:{1}", stream->GetRemoteIP(), ntohs(stream->GetRemotePort())); }); while (RunLoops) {