diff options
author | Saturn&Eric <[email protected]> | 2023-02-25 11:49:54 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2023-02-25 11:49:54 +0000 |
commit | af1cd680f2496629026ba27707cef2afd860f5f9 (patch) | |
tree | 78e78450893e98b8828cc41010e377c1561e5f34 /src/core/function/GlobalSettingStation.cpp | |
parent | fix: improve manual (diff) | |
parent | feat: use aqt to install qt in ci build (diff) | |
download | GpgFrontend-af1cd680f2496629026ba27707cef2afd860f5f9.tar.gz GpgFrontend-af1cd680f2496629026ba27707cef2afd860f5f9.zip |
Merge pull request #91 from saturneric/dev/2.0.10/main
Develop 2.1.0.1
Diffstat (limited to 'src/core/function/GlobalSettingStation.cpp')
-rw-r--r-- | src/core/function/GlobalSettingStation.cpp | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/src/core/function/GlobalSettingStation.cpp b/src/core/function/GlobalSettingStation.cpp index 7231ac9e..79c47408 100644 --- a/src/core/function/GlobalSettingStation.cpp +++ b/src/core/function/GlobalSettingStation.cpp @@ -34,12 +34,12 @@ void GpgFrontend::GlobalSettingStation::SyncSettings() noexcept { using namespace libconfig; try { ui_cfg_.writeFile(ui_config_path_.u8string().c_str()); - LOG(INFO) << _("Updated ui configuration successfully written to") - << ui_config_path_; + SPDLOG_DEBUG("updated ui configuration successfully written to {}", + ui_config_path_.u8string()); } catch (const FileIOException &fioex) { - LOG(ERROR) << _("I/O error while writing ui configuration file") - << ui_config_path_; + SPDLOG_ERROR("i/o error while writing ui configuration file: {}", + ui_config_path_.u8string()); } } @@ -48,14 +48,12 @@ GpgFrontend::GlobalSettingStation::GlobalSettingStation(int channel) noexcept using namespace std::filesystem; using namespace libconfig; - el::Loggers::addFlag(el::LoggingFlag::AutoSpacing); - - LOG(INFO) << _("App Path") << app_path_; - LOG(INFO) << _("App Configure Path") << app_configure_path_; - LOG(INFO) << _("App Data Path") << app_data_path_; - LOG(INFO) << _("App Log Path") << app_log_path_; - LOG(INFO) << _("App Locale Path") << app_locale_path_; - LOG(INFO) << _("App Conf Path") << ui_config_path_; + SPDLOG_INFO("app path: {}", app_path_.u8string()); + SPDLOG_INFO("app configure path: {}", app_configure_path_.u8string()); + SPDLOG_INFO("app data path: {}", app_data_path_.u8string()); + SPDLOG_INFO("app log path: {}", app_log_path_.u8string()); + SPDLOG_INFO("app locale path: {}", app_locale_path_.u8string()); + SPDLOG_INFO("app conf path: {}", ui_config_path_.u8string()); if (!is_directory(app_configure_path_)) create_directory(app_configure_path_); @@ -68,24 +66,24 @@ GpgFrontend::GlobalSettingStation::GlobalSettingStation(int channel) noexcept if (!exists(ui_config_path_)) { try { this->ui_cfg_.writeFile(ui_config_path_.u8string().c_str()); - LOG(INFO) << _("UserInterface configuration successfully written to") - << ui_config_path_; + SPDLOG_DEBUG("user interface configuration successfully written to {}", + ui_config_path_.u8string()); } catch (const FileIOException &fioex) { - LOG(ERROR) - << _("I/O error while writing UserInterface configuration file") - << ui_config_path_; + SPDLOG_DEBUG( + "i/o error while writing UserInterface configuration file {}", + ui_config_path_.u8string()); } } else { try { this->ui_cfg_.readFile(ui_config_path_.u8string().c_str()); - LOG(INFO) << _("UserInterface configuration successfully read from") - << ui_config_path_; + SPDLOG_DEBUG("user interface configuration successfully read from {}", + ui_config_path_.u8string()); } catch (const FileIOException &fioex) { - LOG(ERROR) << _("I/O error while reading UserInterface configure file"); + SPDLOG_ERROR("i/o error while reading UserInterface configure file"); } catch (const ParseException &pex) { - LOG(ERROR) << _("Parse error at ") << pex.getFile() << ":" - << pex.getLine() << " - " << pex.getError(); + SPDLOG_ERROR("parse error at {} : {} - {}", pex.getFile(), pex.getLine(), + pex.getError()); } } } |