diff options
| author | 2025-01-23 16:35:32 +0000 | |
|---|---|---|
| committer | 2025-01-23 16:35:32 +0000 | |
| commit | b9fee8b43dc1903ecb08c81405fb83295fc64db9 (patch) | |
| tree | 80d4bb49c9a2e0e36be0e348a3900d7bec2b7da5 /src/bancache.cpp | |
| parent | Fix the list of supported exemptions. (diff) | |
| download | inspircd++-b9fee8b43dc1903ecb08c81405fb83295fc64db9.tar.gz inspircd++-b9fee8b43dc1903ecb08c81405fb83295fc64db9.tar.bz2 inspircd++-b9fee8b43dc1903ecb08c81405fb83295fc64db9.zip | |
Convert debug logging from string concatenation to format strings.
When running in normal mode this will prevent a bunch of expensive
string concatenation.
Diffstat (limited to 'src/bancache.cpp')
| -rw-r--r-- | src/bancache.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bancache.cpp b/src/bancache.cpp index 27591f0fa..a26e0ab2d 100644 --- a/src/bancache.cpp +++ b/src/bancache.cpp @@ -58,7 +58,7 @@ bool BanCacheManager::RemoveIfExpired(BanCacheHash::iterator& it) if (ServerInstance->Time() < it->second->Expiry) return false; - ServerInstance->Logs.Debug("BANCACHE", "Hit on " + it->first + " is out of date, removing!"); + ServerInstance->Logs.Debug("BANCACHE", "Hit on {} is out of date, removing!", it->first); delete it->second; it = BanHash.erase(it); return true; @@ -67,7 +67,7 @@ bool BanCacheManager::RemoveIfExpired(BanCacheHash::iterator& it) void BanCacheManager::RemoveEntries(const std::string& type, bool positive) { if (positive) - ServerInstance->Logs.Debug("BANCACHE", "BanCacheManager::RemoveEntries(): Removing positive hits for " + type); + ServerInstance->Logs.Debug("BANCACHE", "BanCacheManager::RemoveEntries(): Removing positive hits for {}", type); else ServerInstance->Logs.Debug("BANCACHE", "BanCacheManager::RemoveEntries(): Removing all negative hits"); @@ -93,7 +93,7 @@ void BanCacheManager::RemoveEntries(const std::string& type, bool positive) if (remove) { /* we need to remove this one. */ - ServerInstance->Logs.Debug("BANCACHE", "BanCacheManager::RemoveEntries(): Removing a hit on " + i->first); + ServerInstance->Logs.Debug("BANCACHE", "BanCacheManager::RemoveEntries(): Removing a hit on {}", i->first); delete b; i = BanHash.erase(i); } |
