diff options
author | saturneric <[email protected]> | 2024-07-30 18:42:12 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-07-30 18:42:12 +0000 |
commit | dbb4a21931cd10a3caed3c446af0fe06de9873b1 (patch) | |
tree | b3eb2e6fc3e67ea274472dfacfa3451848b43c80 /src/core/utils/GpgUtils.cpp | |
parent | fix: solve known issues on build (diff) | |
download | GpgFrontend-dbb4a21931cd10a3caed3c446af0fe06de9873b1.tar.gz GpgFrontend-dbb4a21931cd10a3caed3c446af0fe06de9873b1.zip |
feat: simplify logging
Diffstat (limited to 'src/core/utils/GpgUtils.cpp')
-rw-r--r-- | src/core/utils/GpgUtils.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/core/utils/GpgUtils.cpp b/src/core/utils/GpgUtils.cpp index 28892063..3d584b8f 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) { - qCWarning(core) << "gpg operation failed [error code: " << err_code - << "], source: " << gpgme_strsource(err) - << " description: " << GetGpgmeErrorString(err); + LOG_W() << "gpg operation failed [error code: " << err_code + << "], source: " << gpgme_strsource(err) + << " description: " << GetGpgmeErrorString(err); } return err_code; } @@ -61,15 +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) { - qCInfo(core) << "[Warning " << gpg_err_code(err) - << "] Source: " << gpgme_strsource(err) - << " description: " << GetGpgmeErrorString(err) - << " predict: " << GetGpgmeErrorString(predict); + LOG_I() << "[Warning " << gpg_err_code(err) + << "] Source: " << gpgme_strsource(err) + << " description: " << GetGpgmeErrorString(err) + << " predict: " << GetGpgmeErrorString(predict); } else { - qCWarning(core) << "[Error " << gpg_err_code(err) - << "] Source: " << gpgme_strsource(err) - << " description: " << GetGpgmeErrorString(err) - << " predict: " << GetGpgmeErrorString(predict); + LOG_W() << "[Error " << gpg_err_code(err) + << "] Source: " << gpgme_strsource(err) + << " description: " << GetGpgmeErrorString(err) + << " predict: " << GetGpgmeErrorString(predict); } } return err_code; @@ -81,9 +81,9 @@ auto DescribeGpgErrCode(GpgError err) -> GpgErrorDesc { auto CheckGpgError(GpgError err, const QString& /*comment*/) -> GpgError { if (gpg_err_code(err) != GPG_ERR_NO_ERROR) { - qCWarning(core) << "[Error " << gpg_err_code(err) - << "] Source: " << gpgme_strsource(err) - << " description: " << GetGpgmeErrorString(err); + LOG_W() << "[Error " << gpg_err_code(err) + << "] Source: " << gpgme_strsource(err) + << " description: " << GetGpgmeErrorString(err); } return err; } |