diff --git a/include/serialize.h b/include/serialize.h index 2b12e8165..8c95be86b 100644 --- a/include/serialize.h +++ b/include/serialize.h @@ -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 &GetItems(); }; diff --git a/modules/database/db_json.cpp b/modules/database/db_json.cpp index de3d4e2b8..e74caf42a 100644 --- a/modules/database/db_json.cpp +++ b/modules/database/db_json.cpp @@ -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());