diff options
author | Saturneric <[email protected]> | 2023-02-16 17:46:37 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2023-02-16 17:46:37 +0000 |
commit | d9142776de351c8a383ea85865293a2bd2add573 (patch) | |
tree | e94ce97e62e214a3114e0b0e140b5782dd576766 /src/core/GpgCoreInit.cpp | |
parent | fix: solve build problem on windows platform (diff) | |
download | GpgFrontend-d9142776de351c8a383ea85865293a2bd2add573.tar.gz GpgFrontend-d9142776de351c8a383ea85865293a2bd2add573.zip |
fix: solve logging framework issues on windows
Diffstat (limited to 'src/core/GpgCoreInit.cpp')
-rw-r--r-- | src/core/GpgCoreInit.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/GpgCoreInit.cpp b/src/core/GpgCoreInit.cpp index 977bb50c..840b2b87 100644 --- a/src/core/GpgCoreInit.cpp +++ b/src/core/GpgCoreInit.cpp @@ -43,7 +43,7 @@ namespace GpgFrontend { * @brief setup logging system and do proper initialization * */ -void InitLoggingSystem() { +void InitCoreLoggingSystem() { using namespace boost::posix_time; using namespace boost::gregorian; @@ -81,6 +81,15 @@ void InitLoggingSystem() { spdlog::set_default_logger(core_logger); } +void ShutdownCoreLoggingSystem() { +#ifdef WINDOWS + // Under VisualStudio, this must be called before main finishes to workaround + // a known VS issue + spdlog::drop_all(); + spdlog::shutdown(); +#endif +} + void ResetGpgFrontendCore() { reset_gpgfrontend_core(); } void init_gpgfrontend_core() { |