From 50716f2b857f0cf1c9c54717dfafb579d0b19b02 Mon Sep 17 00:00:00 2001 From: royna2544 Date: Thu, 14 Nov 2024 12:41:54 +0900 Subject: [PATCH] ModuleManagement: Logging --- src/api/components/ModuleManagement.cpp | 5 +++++ src/include/api/components/ModuleManagement.hpp | 1 + 2 files changed, 6 insertions(+) diff --git a/src/api/components/ModuleManagement.cpp b/src/api/components/ModuleManagement.cpp index d35901ba..f9aa3c1c 100644 --- a/src/api/components/ModuleManagement.cpp +++ b/src/api/components/ModuleManagement.cpp @@ -129,3 +129,8 @@ TgBotApiImpl::ModulesManagement::ModulesManagement( : _api(api), commandAsync(2) { loadFrom(modules_dir); } + + +TgBotApiImpl::ModulesManagement::~ModulesManagement() { + LOG(INFO) << "Unloading total " << _handles.size() << " modules"; +} \ No newline at end of file diff --git a/src/include/api/components/ModuleManagement.hpp b/src/include/api/components/ModuleManagement.hpp index 58737b6d..96bd5cf8 100644 --- a/src/include/api/components/ModuleManagement.hpp +++ b/src/include/api/components/ModuleManagement.hpp @@ -22,4 +22,5 @@ class TgBotApiImpl::ModulesManagement { bool loadFrom(const std::filesystem::path& directory); explicit ModulesManagement(TgBotApiImpl::Ptr api, const std::filesystem::path& modules_dir); + ~ModulesManagement(); };