1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 18:54:47 +02:00

Add more debug logging to db_json.

This commit is contained in:
Sadie Powell
2026-04-23 18:20:24 +01:00
parent 6c7977f239
commit 040cd99027
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -121,6 +121,7 @@ public:
* @return The serializable object type
*/
Serialize::Type *GetSerializableType() const { return this->s_type; }
const auto &GetSerializableName() const { return this->s_name; }
static const std::list<Serializable *> &GetItems();
};
+6
View File
@@ -413,11 +413,17 @@ public:
for (auto *item : Serializable::GetItems())
{
if (!item->ShouldCommit())
{
Log(LOG_DEBUG) << "Not committing dead " << item->GetSerializableName() << " object: " << item;
continue; // Non-committable object.
}
auto *s_type = item->GetSerializableType();
if (!s_type)
{
Log(LOG_DEBUG) << "Not committing orphaned " << item->GetSerializableName() << " object: " << item;
continue; // Provider has been unloaded.
}
// This should always be found because we create it in the previous step.
auto it = databases.find(s_type->GetOwner());