summaryrefslogtreecommitdiff
path: root/include/qntan/Log.h
diff options
context:
space:
mode:
authorAndreas Fankhauser hiddenalpha.ch2026-01-02 17:20:48 +0100
committerAndreas Fankhauser hiddenalpha.ch2026-01-02 17:20:48 +0100
commit31f7f1db984eefb67be19e6e7fe68102147337bb (patch)
treeb0ed01958984b3c8a9a2b22a22508ec9db7a9810 /include/qntan/Log.h
parentf6634e99211db37f5af54c1151a4b7792b8dfb9a (diff)
downloadQntan-31f7f1db984eefb67be19e6e7fe68102147337bb.tar.gz
Qntan-31f7f1db984eefb67be19e6e7fe68102147337bb.zip
Add an abstract Logger.
Diffstat (limited to 'include/qntan/Log.h')
-rw-r--r--include/qntan/Log.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/include/qntan/Log.h b/include/qntan/Log.h
new file mode 100644
index 0000000..87adba3
--- /dev/null
+++ b/include/qntan/Log.h
@@ -0,0 +1,40 @@
+#ifndef INCGUARD_A5xxH0Ai6CpNInqK
+#define INCGUARD_A5xxH0Ai6CpNInqK
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+#ifndef LOGF
+# define LOGF(A, ...) if(A) (*(A))->fatal(A, __VA_ARGS__)
+#endif
+
+#ifndef LOGE
+# define LOGE(A, ...) if(A) (*(A))->error(A, __VA_ARGS__)
+#endif
+
+#ifndef LOGW
+# define LOGW(A, ...) if(A) (*(A))->warn(A, __VA_ARGS__)
+#endif
+
+#ifndef LOGI
+# define LOGI(A, ...) if(A) (*(A))->info(A, __VA_ARGS__)
+#endif
+
+#ifndef LOGD
+# define LOGD(A, ...) if(A) (*(A))->debug(A, __VA_ARGS__)
+#endif
+
+#ifndef LOGT
+# define LOGT(A, ...) if(A) (*(A))->trace(A, __VA_ARGS__)
+#endif
+
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* INCGUARD_A5xxH0Ai6CpNInqK */