aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/GpgConstants.cpp
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2023-02-25 11:49:54 +0000
committerGitHub <[email protected]>2023-02-25 11:49:54 +0000
commitaf1cd680f2496629026ba27707cef2afd860f5f9 (patch)
tree78e78450893e98b8828cc41010e377c1561e5f34 /src/core/GpgConstants.cpp
parentfix: improve manual (diff)
parentfeat: use aqt to install qt in ci build (diff)
downloadGpgFrontend-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 '')
-rw-r--r--src/core/GpgConstants.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/core/GpgConstants.cpp b/src/core/GpgConstants.cpp
index ff783872..35e485d4 100644
--- a/src/core/GpgConstants.cpp
+++ b/src/core/GpgConstants.cpp
@@ -53,9 +53,8 @@ const char* GpgFrontend::GpgConstants::GPG_FRONTEND_SHORT_CRYPTO_HEAD =
gpgme_error_t GpgFrontend::check_gpg_error(gpgme_error_t err) {
if (gpg_err_code(err) != GPG_ERR_NO_ERROR) {
- LOG(ERROR) << "[" << _("Error") << gpg_err_code(err) << "]" << _("Source: ")
- << gpgme_strsource(err) << _("Description: ")
- << gpgme_strerror(err);
+ SPDLOG_ERROR("[error: {}] source: {} description: {}", gpg_err_code(err),
+ gpgme_strsource(err), gpgme_strerror(err));
}
return err;
}
@@ -65,14 +64,13 @@ gpg_err_code_t GpgFrontend::check_gpg_error_2_err_code(gpgme_error_t err,
auto err_code = gpg_err_code(err);
if (err_code != gpg_err_code(predict)) {
if (err_code == GPG_ERR_NO_ERROR)
- LOG(WARNING) << "[" << _("Warning") << gpg_err_code(err) << "]"
- << _("Source: ") << gpgme_strsource(err)
- << _("Description: ") << gpgme_strerror(err) << _("Predict")
- << gpgme_strerror(err);
+ SPDLOG_WARN("[Warning {}] Source: {} description: {} predict: {}",
+ gpg_err_code(err), gpgme_strsource(err), gpgme_strerror(err),
+ gpgme_strerror(err));
else
- LOG(ERROR) << "[" << _("Error") << gpg_err_code(err) << "]"
- << _("Source: ") << gpgme_strsource(err) << _("Description: ")
- << gpgme_strerror(err) << _("Predict") << gpgme_strerror(err);
+ SPDLOG_ERROR("[Error {}] Source: {} description: {} predict: {}",
+ gpg_err_code(err), gpgme_strsource(err), gpgme_strerror(err),
+ gpgme_strerror(err));
}
return err_code;
}
@@ -80,9 +78,9 @@ gpg_err_code_t GpgFrontend::check_gpg_error_2_err_code(gpgme_error_t err,
gpgme_error_t GpgFrontend::check_gpg_error(gpgme_error_t err,
const std::string& comment) {
if (gpg_err_code(err) != GPG_ERR_NO_ERROR) {
- LOG(ERROR) << "[" << _("Error") << gpg_err_code(err) << "]" << _("Source: ")
- << gpgme_strsource(err) << _("Description: ")
- << gpgme_strerror(err);
+ SPDLOG_WARN("[Error {}] Source: {} description: {} predict: {}",
+ gpg_err_code(err), gpgme_strsource(err), gpgme_strerror(err),
+ gpgme_strerror(err));
}
return err;
}
@@ -201,6 +199,6 @@ GpgFrontend::GpgGenKeyResult GpgFrontend::_new_result(
}
void GpgFrontend::_result_ref_deletor::operator()(void* _result) {
- DLOG(INFO) << _("Called") << _result;
+ SPDLOG_TRACE("gpgme unref {}", _result);
if (_result != nullptr) gpgme_result_unref(_result);
}