clutchlog  0.12
t-dump.cpp
1 #include <iostream>
2 #include <algorithm>
3 #include <random>
4 
5 #include "../clutchlog/clutchlog.h"
6 
7 int main(/*const int argc, char* argv[]*/)
8 {
9  auto& log = clutchlog::logger();
10 
11  log.out(std::clog);
12  log.threshold(clutchlog::level::xdebug);
13 
14  std::vector<std::string> msg = {"hello", "world", "!"};
15 
16  CLUTCHDUMP(xdebug, msg, "test_{n}.dat");
17 
18  std::vector<int> v(3);
19  std::generate(v.begin(), v.end(), std::rand);
20  CLUTCHDUMP(info, v, "rand_{n}.dat");
21 }
CLUTCHDUMP
#define CLUTCHDUMP(LEVEL, CONTAINER, FILENAME)
Dump the given container.
Definition: clutchlog.h:98
clutchlog::logger
static clutchlog & logger()
Get the logger instance.
Definition: clutchlog.h:296