From 054e6e28cca2517dda2319ef683314b3318c39a6 Mon Sep 17 00:00:00 2001 From: saturneric Date: Sun, 3 Dec 2023 12:25:21 -0800 Subject: feat: standarized and speed up app env loading process --- src/init.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index 91d02ac8..f9f1801f 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -41,7 +41,7 @@ #include "core/function/GlobalSettingStation.h" #include "core/utils/MemoryUtils.h" #include "module/GpgFrontendModuleInit.h" -#include "spdlog/logger.h" +#include "module/sdk/Log.h" #include "ui/GpgFrontendUIInit.h" // main @@ -88,7 +88,7 @@ void InitMainLoggingSystem(spdlog::level::level_enum level) { spdlog::set_default_logger(main_logger); } -void InitModules(InitArgs args) { +void InitLoggingSystem(InitArgs args) { // init the logging system for main InitMainLoggingSystem(args.log_level); @@ -97,21 +97,15 @@ void InitModules(InitArgs args) { // init the logging system for ui GpgFrontend::UI::InitUILoggingSystem(args.log_level); - - // init the logging system for modules - GpgFrontend::Module::ModuleInitArgs module_init_args; - module_init_args.log_level = args.log_level; - // - GpgFrontend::Module::LoadGpgFrontendModules(module_init_args); } -void ShutdownModules() { - // shutdown the logging system for core - GpgFrontend::Module::ShutdownGpgFrontendModules(); - +void ShutdownLoggingSystem() { // shutdown the logging system for ui GpgFrontend::UI::ShutdownUILoggingSystem(); + // shutdown the logging system for modules + GpgFrontend::Module::ShutdownGpgFrontendModulesLoggingSystem(); + // shutdown the logging system for core GpgFrontend::ShutdownCoreLoggingSystem(); -- cgit v1.2.3