diff --git a/common/eq_stream.cpp b/common/eq_stream.cpp index 22ba69503..61162580a 100644 --- a/common/eq_stream.cpp +++ b/common/eq_stream.cpp @@ -976,7 +976,7 @@ EQRawApplicationPacket *p=nullptr; if(OpMgr != nullptr && *OpMgr != nullptr) { EmuOpcode emu_op = (*OpMgr)->EQToEmu(p->opcode); if(emu_op == OP_Unknown) { - LogNetcode("Unable to convert EQ opcode 0x%.4x to an Application opcode", p->opcode); + LogNetcode("Unable to convert EQ opcode {:#04x} to an Application opcode", p->opcode); } p->SetOpcode(emu_op); @@ -1417,19 +1417,19 @@ EQStream::MatchState EQStream::CheckSignature(const Signature *sig) { } else if(p->opcode == sig->first_eq_opcode) { //opcode matches, check length.. if(p->size == sig->first_length) { - LogNetcode("[StreamIdentify] [{}]:[{}]: First opcode matched 0x%x and length matched [{}]", long2ip(GetRemoteIP()).c_str(), ntohs(GetRemotePort()), sig->first_eq_opcode, p->size); + LogNetcode("[StreamIdentify] [{}]:[{}]: First opcode matched {:#04x} and length matched [{}]", long2ip(GetRemoteIP()).c_str(), ntohs(GetRemotePort()), sig->first_eq_opcode, p->size); res = MatchSuccessful; } else if(sig->first_length == 0) { - LogNetcode("[StreamIdentify] [{}]:[{}]: First opcode matched 0x%x and length ([{}]) is ignored", long2ip(GetRemoteIP()).c_str(), ntohs(GetRemotePort()), sig->first_eq_opcode, p->size); + LogNetcode("[StreamIdentify] [{}]:[{}]: First opcode matched {:#04x} and length ([{}]) is ignored", long2ip(GetRemoteIP()).c_str(), ntohs(GetRemotePort()), sig->first_eq_opcode, p->size); res = MatchSuccessful; } else { //opcode matched but length did not. - LogNetcode("[StreamIdentify] [{}]:[{}]: First opcode matched 0x%x, but length [{}] did not match expected [{}]", long2ip(GetRemoteIP()).c_str(), ntohs(GetRemotePort()), sig->first_eq_opcode, p->size, sig->first_length); + LogNetcode("[StreamIdentify] [{}]:[{}]: First opcode matched {:#04x}, but length [{}] did not match expected [{}]", long2ip(GetRemoteIP()).c_str(), ntohs(GetRemotePort()), sig->first_eq_opcode, p->size, sig->first_length); res = MatchFailed; } } else { //first opcode did not match.. - LogNetcode("[StreamIdentify] [{}]:[{}]: First opcode 0x%x did not match expected 0x%x", long2ip(GetRemoteIP()).c_str(), ntohs(GetRemotePort()), p->opcode, sig->first_eq_opcode); + LogNetcode("[StreamIdentify] [{}]:[{}]: First opcode {:#04x} did not match expected {:#04x}", long2ip(GetRemoteIP()).c_str(), ntohs(GetRemotePort()), p->opcode, sig->first_eq_opcode); res = MatchFailed; } } diff --git a/common/shareddb.cpp b/common/shareddb.cpp index 01474fb98..65a10f948 100644 --- a/common/shareddb.cpp +++ b/common/shareddb.cpp @@ -1479,9 +1479,8 @@ bool SharedDatabase::UpdateInjectedCommandSettings(const std::vectorbuild_header_dump(dump); - LogError("Recieved unhandled application packet from the client: %s.", dump); + LogError("Recieved unhandled application packet from the client: [{}]", dump); } } } diff --git a/ucs/clientlist.cpp b/ucs/clientlist.cpp index cd5215db3..429f28fbf 100644 --- a/ucs/clientlist.cpp +++ b/ucs/clientlist.cpp @@ -643,7 +643,7 @@ void Clientlist::Process() MailBox, Key); if (!database.VerifyMailKey(CharacterName, (*it)->ClientStream->GetRemoteIP(), Key)) { - LogError("Chat Key for %s does not match, closing connection.", MailBox); + LogError("Chat Key for [{}] does not match, closing connection.", MailBox); KeyValid = false; break; } @@ -668,7 +668,7 @@ void Clientlist::Process() } default: { - LogInfo("Unhandled chat opcode %8X", opcode); + LogInfo("Unhandled chat opcode {:#04x}", opcode); break; } } diff --git a/world/net.cpp b/world/net.cpp index b04feb6a7..aeb9d8b4d 100644 --- a/world/net.cpp +++ b/world/net.cpp @@ -327,7 +327,7 @@ int main(int argc, char** argv) { std::string hotfix_name; if (database.GetVariable("hotfix_name", hotfix_name)) { if (!hotfix_name.empty()) { - LogInfo("Current hotfix in use: '%s'", hotfix_name.c_str()); + LogInfo("Current hotfix in use: [{}]", hotfix_name.c_str()); } } diff --git a/zone/bot_command.cpp b/zone/bot_command.cpp index 348c43b33..3ca3ab169 100644 --- a/zone/bot_command.cpp +++ b/zone/bot_command.cpp @@ -1439,7 +1439,7 @@ int bot_command_init(void) orphaned_bot_command_settings.push_back(bcs_iter.first); LogInfo( - "Bot Command '%s' no longer exists... Deleting orphaned entry from `bot_command_settings` table...", + "Bot Command [{}] no longer exists... Deleting orphaned entry from `bot_command_settings` table", bcs_iter.first.c_str() ); } @@ -1459,14 +1459,14 @@ int bot_command_init(void) injected_bot_command_settings.push_back(std::pair(working_bcl_iter.first, working_bcl_iter.second->access)); LogInfo( - "New Bot Command '%s' found... Adding to `bot_command_settings` table with access '%u'...", + "New Bot Command [{}] found... Adding to `bot_command_settings` table with access [{}]", working_bcl_iter.first.c_str(), working_bcl_iter.second->access ); if (working_bcl_iter.second->access == 0) { LogCommands( - "bot_command_init(): Warning: Bot Command '%s' defaulting to access level 0!", + "bot_command_init(): Warning: Bot Command [{}] defaulting to access level 0!", working_bcl_iter.first.c_str() ); } @@ -1476,7 +1476,7 @@ int bot_command_init(void) working_bcl_iter.second->access = bcs_iter->second.first; LogCommands( - "bot_command_init(): - Bot Command '%s' set to access level %d.", + "bot_command_init(): - Bot Command [{}] set to access level [{}]", working_bcl_iter.first.c_str(), bcs_iter->second.first ); @@ -1492,7 +1492,7 @@ int bot_command_init(void) if (bot_command_list.find(alias_iter) != bot_command_list.end()) { LogCommands( - "bot_command_init(): Warning: Alias '%s' already exists as a bot command - skipping!", + "bot_command_init(): Warning: Alias [{}] already exists as a bot command - skipping!", alias_iter.c_str() ); @@ -1503,7 +1503,7 @@ int bot_command_init(void) bot_command_aliases[alias_iter] = working_bcl_iter.first; LogCommands( - "bot_command_init(): - Alias '%s' added to bot command '%s'.", + "bot_command_init(): - Alias [{}] added to bot command [{}]", alias_iter.c_str(), bot_command_aliases[alias_iter].c_str() ); diff --git a/zone/client.cpp b/zone/client.cpp index aa8499e19..6a0a10f5d 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -2423,10 +2423,10 @@ bool Client::CheckIncreaseSkill(EQEmu::skills::SkillType skillid, Mob *against_w if(zone->random.Real(0, 99) < Chance) { SetSkill(skillid, GetRawSkill(skillid) + 1); - LogSkills("Skill [{}] at value [{}] successfully gain with [{}]%[{}]hance (mod [{}])", skillid, skillval, Chance, chancemodi); + LogSkills("Skill [{}] at value [{}] successfully gain with [{}]% chance (mod [{}])", skillid, skillval, Chance, chancemodi); return true; } else { - LogSkills("Skill [{}] at value [{}] failed to gain with [{}]%[{}]hance (mod [{}])", skillid, skillval, Chance, chancemodi); + LogSkills("Skill [{}] at value [{}] failed to gain with [{}]% chance (mod [{}])", skillid, skillval, Chance, chancemodi); } } else { LogSkills("Skill [{}] at value [{}] cannot increase due to maxmum [{}]", skillid, skillval, maxskill); @@ -2450,10 +2450,10 @@ void Client::CheckLanguageSkillIncrease(uint8 langid, uint8 TeacherSkill) { if(zone->random.Real(0,100) < Chance) { // if they make the roll IncreaseLanguageSkill(langid); // increase the language skill by 1 - LogSkills("Language [{}] at value [{}] successfully gain with %.4f%[{}]hance", langid, LangSkill, Chance); + LogSkills("Language [{}] at value [{}] successfully gain with [{}] % chance", langid, LangSkill, Chance); } else - LogSkills("Language [{}] at value [{}] failed to gain with %.4f%[{}]hance", langid, LangSkill, Chance); + LogSkills("Language [{}] at value [{}] failed to gain with [{}] % chance", langid, LangSkill, Chance); } } diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 2d9f9fe0b..2b5702af4 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4029,7 +4029,7 @@ void Client::Handle_OP_CastSpell(const EQApplicationPacket *app) m_TargetRing = glm::vec3(castspell->x_pos, castspell->y_pos, castspell->z_pos); - LogSpells("OP CastSpell: slot=[{}], spell=[{}], target=[{}], inv=%lx", castspell->slot, castspell->spell_id, castspell->target_id, (unsigned long)castspell->inventoryslot); + LogSpells("OP CastSpell: slot [{}] spell [{}] target [{}] inv [{}]", castspell->slot, castspell->spell_id, castspell->target_id, (unsigned long)castspell->inventoryslot); CastingSlot slot = static_cast(castspell->slot); /* Memorized Spell */ diff --git a/zone/command.cpp b/zone/command.cpp index a0700f04e..1ddd99aa0 100755 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -464,7 +464,7 @@ int command_init(void) orphaned_command_settings.push_back(cs_iter.first); LogInfo( - "Command '%s' no longer exists... Deleting orphaned entry from `command_settings` table...", + "Command [{}] no longer exists... Deleting orphaned entry from `command_settings` table...", cs_iter.first.c_str() ); } @@ -484,14 +484,14 @@ int command_init(void) injected_command_settings.push_back(std::pair(working_cl_iter.first, working_cl_iter.second->access)); LogInfo( - "New Command '%s' found... Adding to `command_settings` table with access '%u'...", + "New Command [{}] found... Adding to `command_settings` table with access [{}]...", working_cl_iter.first.c_str(), working_cl_iter.second->access ); if (working_cl_iter.second->access == 0) { LogCommands( - "command_init(): Warning: Command '%s' defaulting to access level 0!", + "command_init(): Warning: Command [{}] defaulting to access level 0!", working_cl_iter.first.c_str() ); } @@ -501,7 +501,7 @@ int command_init(void) working_cl_iter.second->access = cs_iter->second.first; LogCommands( - "command_init(): - Command '%s' set to access level %d.", + "command_init(): - Command [{}] set to access level [{}]", working_cl_iter.first.c_str(), cs_iter->second.first ); @@ -517,7 +517,7 @@ int command_init(void) if (commandlist.find(alias_iter) != commandlist.end()) { LogCommands( - "command_init(): Warning: Alias '%s' already exists as a command - skipping!", + "command_init(): Warning: Alias [{}] already exists as a command - skipping!", alias_iter.c_str() ); @@ -528,7 +528,7 @@ int command_init(void) commandaliases[alias_iter] = working_cl_iter.first; LogCommands( - "command_init(): - Alias '%s' added to command '%s'.", + "command_init(): - Alias [{}] added to command [{}]", alias_iter.c_str(), commandaliases[alias_iter].c_str() ); diff --git a/zone/heal_rotation.cpp b/zone/heal_rotation.cpp index e4fffafef..3de331623 100644 --- a/zone/heal_rotation.cpp +++ b/zone/heal_rotation.cpp @@ -906,7 +906,7 @@ void HealRotation::bias_targets() for (auto tlist_iter : m_target_pool) { if (!tlist_iter) { continue; } - LogError("([{}]) [{}] (hp: %3.1f%%, at: [{}], dontheal: [{}], crit(base): [{}]([{}]), safe(base): [{}]([{}]), hcnt(ext): [{}]([{}]), hfreq(ext): [{}]([{}]))", + LogError("([{}]) [{}] (hp: [{}], at: [{}], dontheal: [{}], crit(base): [{}]([{}]), safe(base): [{}]([{}]), hcnt(ext): [{}]([{}]), hfreq(ext): [{}]([{}]))", (++target_index), tlist_iter->GetCleanName(), tlist_iter->GetHPRatio(), ClassArmorType(tlist_iter->GetClass()), diff --git a/zone/spells.cpp b/zone/spells.cpp index 4518a7419..6d2e0d140 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -810,7 +810,7 @@ bool Client::CheckFizzle(uint16 spell_id) float fizzle_roll = zone->random.Real(0, 100); - LogSpells("Check Fizzle [{}] spell [{}] fizzlechance: %0.2f%% diff: %0.2f roll: %0.2f", GetName(), spell_id, fizzlechance, diff, fizzle_roll); + LogSpells("Check Fizzle [{}] spell [{}] fizzlechance: [{}] diff: [{}] roll: [{}]", GetName(), spell_id, fizzlechance, diff, fizzle_roll); if(fizzle_roll > fizzlechance) return(true); diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 3fa1a3abc..10e4a11f3 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -601,7 +601,7 @@ void Mob::SendToFixZ(float new_x, float new_y, float new_z) { float newz = zone->zonemap->FindBestZ(dest, nullptr); - LogPathing("BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz, m_Position.x, m_Position.y, m_Position.z); + LogPathing("BestZ returned [{}] at [{}], [{}], [{}]", newz, m_Position.x, m_Position.y, m_Position.z); if ((newz > -2000) && std::abs(newz - dest.z) < RuleR(Map, FixPathingZMaxDeltaSendTo)) // Sanity check. m_Position.z = newz + 1; diff --git a/zone/zone.cpp b/zone/zone.cpp index f4aade55c..1bb8b8c36 100755 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -1671,7 +1671,7 @@ ZonePoint* Zone::GetClosestZonePoint(const glm::vec3& location, uint32 to, Clien if ((zone->HasWaterMap() && !zone->watermap->InZoneLine(glm::vec3(client->GetPosition()))) || (!zone->HasWaterMap() && closest_dist > 400.0f && closest_dist < max_distance2)) { //TODO cheat detection - LogInfo("WARNING: Closest zone point for zone id [{}] is %f, you might need to update your zone_points table if you dont arrive at the right spot", to, closest_dist); + LogInfo("WARNING: Closest zone point for zone id [{}] is [{}], you might need to update your zone_points table if you dont arrive at the right spot", to, closest_dist); LogInfo(". [{}]", to_string(location).c_str()); } diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index 94cae2054..dc2e29cad 100755 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -4176,10 +4176,10 @@ bool ZoneDatabase::LoadFactionData() faction_array[index]->mods[mr_row[2]] = atoi(mr_row[1]); } - Log(Logs::General, Logs::Status, "%u Faction Modifier%s loaded...", modifier_results.RowCount(), (modifier_results.RowCount() == 1 ? "" : "s")); + LogInfo("[{}] Faction Modifier(s) loaded", modifier_results.RowCount()); } else { - Log(Logs::General, Logs::Status, "Unable to load Faction Modifier data..."); + LogError("Unable to load Faction Modifier data"); } return true; diff --git a/zone/zoning.cpp b/zone/zoning.cpp index 2fa94627f..8eaa05c5a 100644 --- a/zone/zoning.cpp +++ b/zone/zoning.cpp @@ -348,7 +348,7 @@ void Client::DoZoneSuccess(ZoneChange_Struct *zc, uint16 zone_id, uint32 instanc if(this->GetPet()) entity_list.RemoveFromHateLists(this->GetPet()); - LogInfo("Zoning [{}] to: [{}] ([{}]) - ([{}]) x=%f, y=%f, z=%f", m_pp.name, database.GetZoneName(zone_id), zone_id, instance_id, dest_x, dest_y, dest_z); + LogInfo("Zoning [{}] to: [{}] ([{}]) - ([{}]) x [{}] y [{}] z [{}]", m_pp.name, database.GetZoneName(zone_id), zone_id, instance_id, dest_x, dest_y, dest_z); //set the player's coordinates in the new zone so they have them //when they zone into it