refactor msg formatting, add CLUTCHDUMP

- remove show_* methods.
This commit is contained in:
Johann Dreo 2020-08-30 23:30:00 +02:00
commit 819a2ebf15
4 changed files with 195 additions and 68 deletions

18
tests/t-dump.cpp Normal file
View file

@ -0,0 +1,18 @@
#include <iostream>
#include "../clutchlog/clutchlog.h"
int main(/*const int argc, char* argv[]*/)
{
#ifdef WITH_CLUTCHLOG
auto& log = clutchlog::logger();
log.out(std::clog);
log.threshold(clutchlog::level::xdebug);
std::vector<std::string> msg = {"hello", "world", "!"};
CLUTCHDUMP(xdebug, msg);
#endif
}

View file

@ -27,9 +27,6 @@ int main(/*const int argc, char* argv[]*/)
auto& log = clutchlog::logger();
log.out(std::clog);
log.threshold(clutchlog::level::warning);
log.file("core");
log.func("(main|f)");
std::clog << "depth: 99; threshold: xdebug; location: .*" << std::endl;
log.depth(99);