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/function/KeyPackageOperator.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/function/KeyPackageOperator.cpp')
-rw-r--r-- | src/core/function/KeyPackageOperator.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/function/KeyPackageOperator.cpp b/src/core/function/KeyPackageOperator.cpp index ccba642c..c5c573ce 100644 --- a/src/core/function/KeyPackageOperator.cpp +++ b/src/core/function/KeyPackageOperator.cpp @@ -45,7 +45,7 @@ namespace GpgFrontend { auto KeyPackageOperator::GeneratePassphrase(const QString& phrase_path, QString& phrase) -> bool { phrase = PassphraseGenerator::GetInstance().Generate(256); - qCDebug(core, "generated passphrase: %lld bytes", phrase.size()); + FLOG_D("generated passphrase: %lld bytes", phrase.size()); return WriteFile(phrase_path, phrase.toUtf8()); } @@ -57,8 +57,8 @@ void KeyPackageOperator::GenerateKeyPackage(const QString& key_package_path, GpgKeyImportExporter::GetInstance().ExportAllKeys( keys, secret, true, [=](GpgError err, const DataObjectPtr& data_obj) { if (CheckGpgError(err) != GPG_ERR_NO_ERROR) { - qCWarning(core) << "export keys error, reason: " - << DescribeGpgErrCode(err).second; + LOG_W() << "export keys error, reason: " + << DescribeGpgErrCode(err).second; cb(-1, data_obj); return; } @@ -93,14 +93,14 @@ void KeyPackageOperator::ImportKeyPackage(const QString& key_package_path, ReadFile(key_package_path, encrypted_data); if (encrypted_data.isEmpty()) { - qCWarning(core) << "failed to read key package: " << key_package_path; + LOG_W() << "failed to read key package: " << key_package_path; return -1; }; QByteArray passphrase; ReadFile(phrase_path, passphrase); if (passphrase.size() != 256) { - qCWarning(core) << "passphrase size mismatch: " << phrase_path; + LOG_W() << "passphrase size mismatch: " << phrase_path; return -1; } |