diff options
author | Saturneric <[email protected]> | 2023-02-11 14:10:09 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2023-02-11 14:10:09 +0000 |
commit | 6a75817c85b0d4a97cea82ad2331736cff9913cf (patch) | |
tree | 261b01c4dc55a28241694a5e292d9fc5c77b6319 /src/ui/struct/SettingsObject.cpp | |
parent | feat: upgrade qt framework to 6.3 (diff) | |
download | GpgFrontend-6a75817c85b0d4a97cea82ad2331736cff9913cf.tar.gz GpgFrontend-6a75817c85b0d4a97cea82ad2331736cff9913cf.zip |
fix: reduce info level logs
Diffstat (limited to 'src/ui/struct/SettingsObject.cpp')
-rw-r--r-- | src/ui/struct/SettingsObject.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ui/struct/SettingsObject.cpp b/src/ui/struct/SettingsObject.cpp index f2fb4820..d5230089 100644 --- a/src/ui/struct/SettingsObject.cpp +++ b/src/ui/struct/SettingsObject.cpp @@ -32,7 +32,7 @@ nlohmann::json& GpgFrontend::UI::SettingsObject::Check( const std::string& key, const nlohmann::json& default_value) { // check if the self null if (this->nlohmann::json::is_null()) { - SPDLOG_INFO("settings object is null, creating new one"); + SPDLOG_DEBUG("settings object is null, creating new one"); this->nlohmann::json::operator=(nlohmann::json::object()); } @@ -41,7 +41,7 @@ nlohmann::json& GpgFrontend::UI::SettingsObject::Check( this->nlohmann::json::at(key).is_null() || this->nlohmann::json::at(key).type_name() != default_value.type_name()) { - SPDLOG_INFO("added missing key: {}", key); + SPDLOG_DEBUG("added missing key: {}", key); if (default_value.is_null()) { SPDLOG_WARN("default value is null, using empty object"); this->nlohmann::json::operator[](key) = nlohmann::json::object(); @@ -60,14 +60,14 @@ GpgFrontend::UI::SettingsObject GpgFrontend::UI::SettingsObject::Check( const std::string& key) { // check if the self null if (this->nlohmann::json::is_null()) { - SPDLOG_INFO("settings object is null, creating new one"); + SPDLOG_DEBUG("settings object is null, creating new one"); this->nlohmann::json::operator=(nlohmann::json::object()); } if (!nlohmann::json::contains(key) || this->nlohmann::json::at(key).is_null() || this->nlohmann::json::at(key).type() != nlohmann::json::value_t::object) { - SPDLOG_INFO("added missing key: {}", key); + SPDLOG_DEBUG("added missing key: {}", key); this->nlohmann::json::operator[](key) = nlohmann::json::object(); } return SettingsObject{nlohmann::json::operator[](key), false}; @@ -76,16 +76,16 @@ GpgFrontend::UI::SettingsObject GpgFrontend::UI::SettingsObject::Check( GpgFrontend::UI::SettingsObject::SettingsObject(std::string settings_name) : settings_name_(std::move(settings_name)) { try { - SPDLOG_INFO("loading settings from: {}", this->settings_name_); + SPDLOG_DEBUG("loading settings from: {}", this->settings_name_); auto _json_optional = GpgFrontend::DataObjectOperator::GetInstance().GetDataObject( settings_name_); if (_json_optional.has_value()) { - SPDLOG_INFO("settings object: {} loaded.", settings_name_); + SPDLOG_DEBUG("settings object: {} loaded.", settings_name_); nlohmann::json::operator=(_json_optional.value()); } else { - SPDLOG_INFO("settings object: {} not found.", settings_name_); + SPDLOG_DEBUG("settings object: {} not found.", settings_name_); nlohmann::json::operator=({}); } |