aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/module/ModuleInit.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-07-26 16:24:34 +0000
committersaturneric <[email protected]>2024-07-26 16:24:34 +0000
commit37a62a8d0b590710b902376ca3320cc05e954b63 (patch)
tree349ecff21e5cf53d8eedbae7886404417ecdad05 /src/core/module/ModuleInit.cpp
parentfix: correct urls at appdata.xml (diff)
downloadGpgFrontend-37a62a8d0b590710b902376ca3320cc05e954b63.tar.gz
GpgFrontend-37a62a8d0b590710b902376ca3320cc05e954b63.zip
feat: remove spdlog and clean up log
Diffstat (limited to 'src/core/module/ModuleInit.cpp')
-rw-r--r--src/core/module/ModuleInit.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/core/module/ModuleInit.cpp b/src/core/module/ModuleInit.cpp
index cfeff3df..0e41e949 100644
--- a/src/core/module/ModuleInit.cpp
+++ b/src/core/module/ModuleInit.cpp
@@ -39,11 +39,8 @@
namespace GpgFrontend::Module {
void LoadModuleFromPath(const QString& mods_path, bool integrated) {
- for (const auto& module_library_name :
- QDir(mods_path).entryList(QStringList() << "*.so"
- << "*.dll"
- << "*.dylib",
- QDir::Files)) {
+ for (const auto& module_library_name : QDir(mods_path).entryList(
+ QStringList() << "*.so" << "*.dll" << "*.dylib", QDir::Files)) {
ModuleManager::GetInstance().LoadModule(
mods_path + "/" + module_library_name, integrated);
}
@@ -70,18 +67,15 @@ auto LoadIntegratedMods() -> bool {
mods_path = "/app/modules";
}
- GF_CORE_LOG_DEBUG("try loading integrated modules at path: {} ...",
- mods_path);
if (!QDir(mods_path).exists()) {
- GF_CORE_LOG_WARN(
- "integrated module directory at path {} not found, abort...",
- mods_path);
+ qCWarning(core) << "integrated module directory at path " << mods_path
+ << " not found, abort...";
return false;
}
LoadModuleFromPath(mods_path, true);
- GF_CORE_LOG_DEBUG("load integrated modules done.");
+ qCDebug(core, "load integrated modules done.");
return true;
}
@@ -89,16 +83,14 @@ auto LoadExternalMods() -> bool {
auto mods_path =
GpgFrontend::GlobalSettingStation::GetInstance().GetModulesDir();
- GF_CORE_LOG_DEBUG("try loading external modules at path: {} ...", mods_path);
if (!QDir(mods_path).exists()) {
- GF_CORE_LOG_WARN("external module directory at path {} not found, abort...",
- mods_path);
+ qCWarning(core) << "external module directory at path " << mods_path
+ << " not found, abort...";
return false;
}
LoadModuleFromPath(mods_path, false);
- GF_CORE_LOG_DEBUG("load integrated modules done.");
return true;
}