aboutsummaryrefslogtreecommitdiff
path: root/test/log.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/log.cc')
-rw-r--r--test/log.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/log.cc b/test/log.cc
new file mode 100644
index 0000000..c059ba8
--- /dev/null
+++ b/test/log.cc
@@ -0,0 +1,19 @@
+#include <log.h>
+
+int main() {
+ logging::logger<> mlog;
+ mlog.set_level(logging::kDbg0);
+
+ INFO(&mlog, "Hallo %d", 42);
+ WARN(&mlog, "Hallo %x", 0x1337);
+ FAIL(&mlog, "Hallo %u", 666);
+ DBG0(&mlog, "Hallo %p", (void*)0xf00df00d);
+
+ {
+ logging::logger<false> mlog;
+ INFO(&mlog, "Hallo no time, %d", 42);
+ WARN(&mlog, "Hallo no time, %x", 0x1337);
+ FAIL(&mlog, "Hallo no time, %u", 666);
+ DBG0(&mlog, "Hallo no time, %p", (void*)0xf00df00d);
+ }
+}