aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/GpgCoreInit.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2023-11-29 12:45:48 +0000
committersaturneric <[email protected]>2023-11-29 12:45:48 +0000
commit635a6c16e982ba2a5c7bea28eb31ee235df158c2 (patch)
tree39561f439fdac98b813b671edabdc43f166b642d /src/core/GpgCoreInit.cpp
parentfix: repair gnupg info listing funtion (diff)
downloadGpgFrontend-635a6c16e982ba2a5c7bea28eb31ee235df158c2.tar.gz
GpgFrontend-635a6c16e982ba2a5c7bea28eb31ee235df158c2.zip
feat: introduce cmd functions
Diffstat (limited to 'src/core/GpgCoreInit.cpp')
-rw-r--r--src/core/GpgCoreInit.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/core/GpgCoreInit.cpp b/src/core/GpgCoreInit.cpp
index cbf07b62..97f9f68a 100644
--- a/src/core/GpgCoreInit.cpp
+++ b/src/core/GpgCoreInit.cpp
@@ -49,7 +49,7 @@ namespace GpgFrontend {
* @brief setup logging system and do proper initialization
*
*/
-void InitCoreLoggingSystem() {
+void InitCoreLoggingSystem(spdlog::level::level_enum level) {
// get the log directory
auto logfile_path =
(GlobalSettingStation::GetInstance().GetLogDir() / "core");
@@ -70,11 +70,8 @@ void InitCoreLoggingSystem() {
core_logger->set_pattern(
"[%H:%M:%S.%e] [T:%t] [%=6n] %^[%=8l]%$ [%s:%#] [%!] -> %v (+%ius)");
-#ifdef DEBUG
- core_logger->set_level(spdlog::level::trace);
-#else
- core_logger->set_level(spdlog::level::info);
-#endif
+ // set the level of logger
+ core_logger->set_level(level);
// flush policy
#ifdef DEBUG