diff options
| author | 2023-07-05 15:04:19 +0100 | |
|---|---|---|
| committer | 2023-07-05 15:06:15 +0100 | |
| commit | a3269e37bdafb9e4bbdd3014dc2c2cc27635e51c (patch) | |
| tree | 0d87578aced05a4b3d5d69a22cc2f7858aed022c | |
| parent | Restore the double container logic in CullList::Apply. (diff) | |
Minor improvements to cull logging.
- CULLLIST has been renamed to CULL which is easier to spell.
- Some log messages have been improved slightly.
| -rw-r--r-- | src/base.cpp | 4 | ||||
| -rw-r--r-- | src/cull.cpp | 16 | ||||
| -rw-r--r-- | src/extensible.cpp | 2 | ||||
| -rw-r--r-- | src/users.cpp | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/base.cpp b/src/base.cpp index a77dec862..1653b7d9b 100644 --- a/src/base.cpp +++ b/src/base.cpp @@ -51,7 +51,7 @@ refcountbase::~refcountbase() { if (refcount && ServerInstance) { - ServerInstance->Logs.Debug("CULLLIST", "refcountbase::~ @{} with refcount {}", + ServerInstance->Logs.Debug("CULL", "refcountbase::~ @{} with refcount {}", fmt::ptr(this), refcount); } } @@ -60,7 +60,7 @@ usecountbase::~usecountbase() { if (usecount && ServerInstance) { - ServerInstance->Logs.Debug("CULLLIST", "usecountbase::~ @{} with refcount {}", + ServerInstance->Logs.Debug("CULL", "usecountbase::~ @{} with refcount {}", fmt::ptr(this), usecount); } } 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(); } diff --git a/src/extensible.cpp b/src/extensible.cpp index c6799bba2..559a395c1 100644 --- a/src/extensible.cpp +++ b/src/extensible.cpp @@ -58,7 +58,7 @@ Extensible::~Extensible() { if ((!extensions.empty() || !culled) && ServerInstance) { - ServerInstance->Logs.Debug("CULLLIST", "Extensible destructor called without cull @{}", + ServerInstance->Logs.Debug("CULL", "Extensible was deleted without being culled: @{}", fmt::ptr(this)); } } diff --git a/src/users.cpp b/src/users.cpp index 8b45faaff..7edd9ed3e 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -337,7 +337,7 @@ Cullable::Result User::Cull() { if (!quitting) { - ServerInstance->Logs.Debug("CULLLIST", "BUG: User {} (@{}) was culled without being quit first!", + ServerInstance->Logs.Debug("CULL", "BUG: User {} (@{}) was culled without being quit first!", uuid, fmt::ptr(this)); ServerInstance->Users.QuitUser(this, "Culled without QuitUser"); } |
