clutchlog/tests/t-dump.cpp
nojhan 243b22e4c1 feat: optimize out in Release builds
- fix: fastest scope matching,
- feat: try to allow the compiler to optimize out as many conditional statements as possible,
        which allow to use clutchlog for progress-only messages in Release mode.
- feat: build_all.sh test script,
- fix: typo in macro declarations in builds without clutchlog,
- update the README accordingly.
2020-09-15 23:12:19 +02:00

21 lines
477 B
C++

#include <iostream>
#include <algorithm>
#include <random>
#include "../clutchlog/clutchlog.h"
int main(/*const int argc, char* argv[]*/)
{
auto& log = clutchlog::logger();
log.out(std::clog);
log.threshold(clutchlog::level::xdebug);
std::vector<std::string> msg = {"hello", "world", "!"};
CLUTCHDUMP(xdebug, msg, "test_{n}.dat");
std::vector<int> v(3);
std::generate(v.begin(), v.end(), std::rand);
CLUTCHDUMP(info, v, "rand_{n}.dat");
}