From a3269e37bdafb9e4bbdd3014dc2c2cc27635e51c Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 5 Jul 2023 15:04:19 +0100 Subject: Minor improvements to cull logging. - CULLLIST has been renamed to CULL which is easier to spell. - Some log messages have been improved slightly. --- src/cull.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/cull.cpp') diff --git a/src/cull.cpp b/src/cull.cpp index e07bc036b..f97d7bdf9 100644 --- a/src/cull.cpp +++ b/src/cull.cpp @@ -35,7 +35,7 @@ Cullable::Cullable() #ifdef INSPIRCD_ENABLE_RTTI if (ServerInstance) { - ServerInstance->Logs.Debug("CULLLIST", "Cullable::+{} @{}", + ServerInstance->Logs.Debug("CULL", "Cullable::+{} @{}", typeid(*this).name(), fmt::ptr(this)); } #endif @@ -46,7 +46,7 @@ Cullable::~Cullable() #ifdef INSPIRCD_ENABLE_RTTI if (ServerInstance) { - ServerInstance->Logs.Debug("CULLLIST", "Cullable::~{} @{}", + ServerInstance->Logs.Debug("CULL", "Cullable::~{} @{}", typeid(*this).name(), fmt::ptr(this)); } #endif @@ -57,7 +57,7 @@ Cullable::Result Cullable::Cull() #ifdef INSPIRCD_ENABLE_RTTI if (ServerInstance) { - ServerInstance->Logs.Debug("CULLLIST", "Cullable::-{} @{}", + ServerInstance->Logs.Debug("CULL", "Cullable::-{} @{}", typeid(*this).name(), fmt::ptr(this)); } #endif @@ -91,7 +91,7 @@ void CullList::Apply() if (culled.insert(c).second) { #ifdef INSPIRCD_ENABLE_RTTI - ServerInstance->Logs.Debug("CULLLIST", "Culling {} @{}", typeid(*c).name(), + ServerInstance->Logs.Debug("CULL", "Culling {} @{}", typeid(*c).name(), fmt::ptr(c)); #endif c->Cull(); @@ -103,10 +103,10 @@ void CullList::Apply() else { #ifdef INSPIRCD_ENABLE_RTTI - ServerInstance->Logs.Debug("CULLLIST", "BUG: {} @{} was added to the cull list twice!", + ServerInstance->Logs.Debug("CULL", "BUG: {} @{} was added to the cull list twice!", typeid(*c).name(), fmt::ptr(c)); #else - ServerInstance->Logs.Debug("CULLLIST", "BUG: @{} was added to the cull list twice!", + ServerInstance->Logs.Debug("CULL", "BUG: @{} was added to the cull list twice!", fmt::ptr(c)); #endif } @@ -116,7 +116,7 @@ void CullList::Apply() for (auto* c : deletable) { #ifdef INSPIRCD_ENABLE_RTTI - ServerInstance->Logs.Debug("CULLLIST", "Deleting {} @{}", typeid(*c).name(), + ServerInstance->Logs.Debug("CULL", "Deleting {} @{}", typeid(*c).name(), fmt::ptr(c)); #endif delete c; @@ -124,7 +124,7 @@ void CullList::Apply() if (!list.empty()) { - ServerInstance->Logs.Debug("CULLLIST", "BUG: {} objects were added to the cull list from a destructor", + ServerInstance->Logs.Debug("CULL", "BUG: {} objects were added to the cull list from a destructor", list.size()); Apply(); } -- cgit v1.3.1-10-gc9f91