aboutsummaryrefslogblamecommitdiff
path: root/test/log.cc
blob: 7d8305d9de7527ae61d7b8ea64e2d03ce0cc66d1 (plain) (tree)
1
2
3
4
5
6
7





                                 
                             












                                                        
#include <log.h>

int main() {
  logging::logger<> mlog;
  mlog.set_level(logging::kDbg0);

  INFO(&mlog, "Hallo nofmt");
  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);
  }
}