From b9fee8b43dc1903ecb08c81405fb83295fc64db9 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 23 Jan 2025 16:35:32 +0000 Subject: Convert debug logging from string concatenation to format strings. When running in normal mode this will prevent a bunch of expensive string concatenation. --- src/modules/m_spanningtree/ijoin.cpp | 4 ++-- src/modules/m_spanningtree/sinfo.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/modules/m_spanningtree') diff --git a/src/modules/m_spanningtree/ijoin.cpp b/src/modules/m_spanningtree/ijoin.cpp index 22f3c28c6..444d7e8ed 100644 --- a/src/modules/m_spanningtree/ijoin.cpp +++ b/src/modules/m_spanningtree/ijoin.cpp @@ -31,7 +31,7 @@ CmdResult CommandIJoin::HandleRemote(RemoteUser* user, Params& params) { // Desync detected, recover // Ignore the join and send RESYNC, this will result in the remote server sending all channel data to us - ServerInstance->Logs.Debug(MODNAME, "Received IJOIN for nonexistent channel: " + params[0]); + ServerInstance->Logs.Debug(MODNAME, "Received IJOIN for nonexistent channel: {}", params[0]); CmdBuilder("RESYNC").push(params[0]).Unicast(user); @@ -58,7 +58,7 @@ CmdResult CommandIJoin::HandleRemote(RemoteUser* user, Params& params) CmdResult CommandResync::HandleServer(TreeServer* server, CommandBase::Params& params) { - ServerInstance->Logs.Debug(MODNAME, "Resyncing " + params[0]); + ServerInstance->Logs.Debug(MODNAME, "Resyncing {}", params[0]); auto* chan = ServerInstance->Channels.Find(params[0]); if (!chan) { diff --git a/src/modules/m_spanningtree/sinfo.cpp b/src/modules/m_spanningtree/sinfo.cpp index d1fcc7856..09e654b3b 100644 --- a/src/modules/m_spanningtree/sinfo.cpp +++ b/src/modules/m_spanningtree/sinfo.cpp @@ -35,7 +35,8 @@ CmdResult CommandSInfo::HandleServer(TreeServer* server, CommandBase::Params& pa else if (irc::equals(key, "desc")) { // Only sent when the description of a server changes because of a rehash; not sent on burst - ServerInstance->Logs.Debug(MODNAME, "Server description of " + server->GetName() + " changed: " + value); + ServerInstance->Logs.Debug(MODNAME, "Server description of {} changed: {}", + server->GetName(), value); server->SetDesc(value); } else if (irc::equals(key, "rawbranch")) -- cgit v1.3.1-10-gc9f91