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. --- include/modules.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/modules.h b/include/modules.h index 3996ffb8d..50a611437 100644 --- a/include/modules.h +++ b/include/modules.h @@ -1213,7 +1213,7 @@ public: } \ catch (const CoreException& _exception_ ## EVENT) \ { \ - ServerInstance->Logs.Debug("MODULE", _mod->ModuleFile + " threw an exception in " # EVENT ": " + (_exception_ ## EVENT).GetReason()); \ + ServerInstance->Logs.Debug("MODULE", "{} threw an exception in " # EVENT ": {}", _mod->ModuleFile, (_exception_ ## EVENT).GetReason()); \ } \ } \ } while (false) @@ -1240,7 +1240,7 @@ public: } \ catch (const CoreException& _exception_ ## EVENT) \ { \ - ServerInstance->Logs.Debug("MODULE", _mod->ModuleFile + " threw an exception in " # EVENT ": " + (_exception_ ## EVENT).GetReason()); \ + ServerInstance->Logs.Debug("MODULE", "{} threw an exception in " # EVENT ": {}", _mod->ModuleFile, (_exception_ ## EVENT).GetReason()); \ } \ } \ } while (false) -- cgit v1.3.1-10-gc9f91