aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWojciech Kosior <kwojtus@protonmail.com>2020-05-07 19:53:51 +0200
committerWojciech Kosior <kwojtus@protonmail.com>2020-05-07 19:53:51 +0200
commitc0e1c65491f9d6726b16f107c25f2e5787e7e2ec (patch)
treef5bb3e414d47c49e4c555e5fc221c83ab00fcbf3 /include
parentdb227f3f975bb4be122711658efc8b03909851eb (diff)
download0tdns-c0e1c65491f9d6726b16f107c25f2e5787e7e2ec.tar.gz
0tdns-c0e1c65491f9d6726b16f107c25f2e5787e7e2ec.zip
add mock of our logging facility
Diffstat (limited to 'include')
-rw-r--r--include/log.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/log.h b/include/log.h
new file mode 100644
index 0000000..91d968f
--- /dev/null
+++ b/include/log.h
@@ -0,0 +1,17 @@
+#ifndef ZTDNS_LOG_H
+#define ZTDNS_LOG_H
+
+#include <stdio.h>
+
+#define ERROR 1
+#define WARN 2
+#define INFO 3
+#define DEBUG 4
+
+/* This function will change later - it's just a "mock", so that every1 can
+ * already write code with ztdns_log() :)
+ * Use like ztdns_log(DEBUG, "something wrong happened! %s", errorstring);
+ */
+#define ztdns_log(level, printfargs...) printf(printfargs)
+
+#endif /* ZTDNS_LOG_H */