aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/utils/GpgUtils.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-07-26 16:24:34 +0000
committersaturneric <[email protected]>2024-07-26 16:24:34 +0000
commit37a62a8d0b590710b902376ca3320cc05e954b63 (patch)
tree349ecff21e5cf53d8eedbae7886404417ecdad05 /src/core/utils/GpgUtils.cpp
parentfix: correct urls at appdata.xml (diff)
downloadGpgFrontend-37a62a8d0b590710b902376ca3320cc05e954b63.tar.gz
GpgFrontend-37a62a8d0b590710b902376ca3320cc05e954b63.zip
feat: remove spdlog and clean up log
Diffstat (limited to 'src/core/utils/GpgUtils.cpp')
-rw-r--r--src/core/utils/GpgUtils.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/core/utils/GpgUtils.cpp b/src/core/utils/GpgUtils.cpp
index 0d00b13e..1d81b272 100644
--- a/src/core/utils/GpgUtils.cpp
+++ b/src/core/utils/GpgUtils.cpp
@@ -50,9 +50,9 @@ auto GetGpgmeErrorString(gpgme_error_t err) -> QString {
auto CheckGpgError(GpgError err) -> GpgError {
auto err_code = gpg_err_code(err);
if (err_code != GPG_ERR_NO_ERROR) {
- GF_CORE_LOG_ERROR(
- "gpg operation failed [error code: {}], source: {} description: {}",
- err_code, gpgme_strsource(err), GetGpgmeErrorString(err));
+ qCWarning(core) << "gpg operation failed [error code: " << err_code
+ << "], source: " << gpgme_strsource(err)
+ << " description: " << GetGpgmeErrorString(err);
}
return err_code;
}
@@ -61,13 +61,15 @@ auto CheckGpgError2ErrCode(GpgError err, GpgError predict) -> GpgErrorCode {
auto err_code = gpg_err_code(err);
if (err_code != gpg_err_code(predict)) {
if (err_code == GPG_ERR_NO_ERROR) {
- GF_CORE_LOG_WARN("[Warning {}] Source: {} description: {} predict: {}",
- gpg_err_code(err), gpgme_strsource(err),
- GetGpgmeErrorString(err), GetGpgmeErrorString(predict));
+ qCInfo(core) << "[Warning " << gpg_err_code(err)
+ << "] Source: " << gpgme_strsource(err)
+ << " description: " << GetGpgmeErrorString(err)
+ << " predict: " << GetGpgmeErrorString(predict);
} else {
- GF_CORE_LOG_ERROR("[Error {}] Source: {} description: {} predict: {}",
- gpg_err_code(err), gpgme_strsource(err),
- GetGpgmeErrorString(err), GetGpgmeErrorString(predict));
+ qCWarning(core) << "[Error " << gpg_err_code(err)
+ << "] Source: " << gpgme_strsource(err)
+ << " description: " << GetGpgmeErrorString(err)
+ << " predict: " << GetGpgmeErrorString(predict);
}
}
return err_code;
@@ -79,8 +81,9 @@ auto DescribeGpgErrCode(GpgError err) -> GpgErrorDesc {
auto CheckGpgError(GpgError err, const QString& /*comment*/) -> GpgError {
if (gpg_err_code(err) != GPG_ERR_NO_ERROR) {
- GF_CORE_LOG_WARN("[Error {}] Source: {} description: {}", gpg_err_code(err),
- gpgme_strsource(err), GetGpgmeErrorString(err));
+ qCWarning(core) << "[Error " << gpg_err_code(err)
+ << "] Source: " << gpgme_strsource(err)
+ << " description: " << GetGpgmeErrorString(err);
}
return err;
}