From d80134afe11289bf68630d59e0db5edcbb898c20 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Mon, 16 Oct 2023 20:11:55 +0200 Subject: log: add minimal stderr logger --- test/log.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/log.cc (limited to 'test/log.cc') 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 + +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 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); + } +} -- cgit v1.2.3