aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/GpgCoreInit.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2023-02-16 17:46:37 +0000
committerSaturneric <[email protected]>2023-02-16 17:46:37 +0000
commitd9142776de351c8a383ea85865293a2bd2add573 (patch)
treee94ce97e62e214a3114e0b0e140b5782dd576766 /src/core/GpgCoreInit.cpp
parentfix: solve build problem on windows platform (diff)
downloadGpgFrontend-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.cpp11
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() {