aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/GpgFrontendUIInit.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2023-12-03 12:28:46 +0000
committersaturneric <[email protected]>2023-12-03 12:28:46 +0000
commit883db05d54510e76b6548e107593187e1306117d (patch)
treea4de9d60d3bfeb69ba443129d208feef65250b2c /src/ui/GpgFrontendUIInit.cpp
parentfeat: improve memory security of function framework (diff)
downloadGpgFrontend-883db05d54510e76b6548e107593187e1306117d.tar.gz
GpgFrontend-883db05d54510e76b6548e107593187e1306117d.zip
feat: general improvements of aync execution and memory security
Diffstat (limited to 'src/ui/GpgFrontendUIInit.cpp')
-rw-r--r--src/ui/GpgFrontendUIInit.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ui/GpgFrontendUIInit.cpp b/src/ui/GpgFrontendUIInit.cpp
index a1dbc5f6..454e0e2a 100644
--- a/src/ui/GpgFrontendUIInit.cpp
+++ b/src/ui/GpgFrontendUIInit.cpp
@@ -207,15 +207,17 @@ void InitUILoggingSystem(spdlog::level::level_enum level) {
// sinks
std::vector<spdlog::sink_ptr> sinks;
- sinks.push_back(std::make_shared<spdlog::sinks::stderr_color_sink_mt>());
- sinks.push_back(std::make_shared<spdlog::sinks::rotating_file_sink_mt>(
- logfile_path.u8string(), 1048576 * 32, 32));
+ sinks.push_back(GpgFrontend::SecureCreateSharedObject<
+ spdlog::sinks::stderr_color_sink_mt>());
+ sinks.push_back(GpgFrontend::SecureCreateSharedObject<
+ spdlog::sinks::rotating_file_sink_mt>(logfile_path.u8string(),
+ 1048576 * 32, 32));
// thread pool
spdlog::init_thread_pool(1024, 2);
// logger
- auto ui_logger = std::make_shared<spdlog::async_logger>(
+ auto ui_logger = GpgFrontend::SecureCreateSharedObject<spdlog::async_logger>(
"ui", begin(sinks), end(sinks), spdlog::thread_pool());
ui_logger->set_pattern(
"[%H:%M:%S.%e] [T:%t] [%=6n] %^[%=8l]%$ [%s:%#] [%!] -> %v (+%ius)");