aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/GpgFrontendTest.h
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-07-30 18:42:12 +0000
committersaturneric <[email protected]>2024-07-30 18:42:12 +0000
commitdbb4a21931cd10a3caed3c446af0fe06de9873b1 (patch)
treeb3eb2e6fc3e67ea274472dfacfa3451848b43c80 /src/test/GpgFrontendTest.h
parentfix: solve known issues on build (diff)
downloadGpgFrontend-dbb4a21931cd10a3caed3c446af0fe06de9873b1.tar.gz
GpgFrontend-dbb4a21931cd10a3caed3c446af0fe06de9873b1.zip
feat: simplify logging
Diffstat (limited to 'src/test/GpgFrontendTest.h')
-rw-r--r--src/test/GpgFrontendTest.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/test/GpgFrontendTest.h b/src/test/GpgFrontendTest.h
index ee9dc01d..d78f6636 100644
--- a/src/test/GpgFrontendTest.h
+++ b/src/test/GpgFrontendTest.h
@@ -28,14 +28,30 @@
#pragma once
+// project base header
+#include "GpgFrontend.h"
+
+// symbol exports header
#include "GpgFrontendTestExport.h"
-// declare area of test
-#ifdef GF_TEST
+// private declare area of test
+#ifdef GF_TEST_PRIVATE
// declare logging category
Q_DECLARE_LOGGING_CATEGORY(test)
+#define LOG_D() qCDebug(test)
+#define LOG_I() qCInfo(test)
+#define LOG_W() qCWarning(test)
+#define LOG_E() qCCritical(test)
+#define LOG_F() qCFatal(test)
+
+#define FLOG_D(...) qCDebug(test, __VA_ARGS__)
+#define FLOG_I(...) qCInfo(test, __VA_ARGS__)
+#define FLOG_W(...) qCWarning(test, __VA_ARGS__)
+#define FLOG_E(...) qCCritical(test, __VA_ARGS__)
+#define FLOG_F(...) qCFatal(test, __VA_ARGS__)
+
#endif
namespace GpgFrontend::Test {