3 #include "../clutchlog/clutchlog.h"
7 CLUTCHLOG(progress,
"Dump parsed data...");
8 CLUTCHLOG(debug,
"Write in `data_dump.csv`");
9 CLUTCHLOG(debug,
"Data frame size: " << 0 <<
"x" <<
"150");
15 CLUTCHLOG(progress,
"Reset data structures...");
18 CLUTCHLOG(critical,
"Impossible to reset, I cannot recover.");
24 CLUTCHLOG(note,
"Filling up data of size: " << 0);
25 CLUTCHLOG(error,
"Cannot parse input, I will reset stuff.");
27 CLUTCHLOG(xdebug,
"Last seen state: " << 0);
32 CLUTCHLOG(debug,
"Data frame size: " << 2 <<
"x" <<
"150");
33 CLUTCHLOG(xdebug,
"Resolution: " << 0.001);
34 CLUTCHLOG(warning,
"Input height < " << 3);
39 CLUTCHLOG(progress,
"Allocate memory...");
46 CLUTCHLOG(progress,
"Initialize data structures...");
49 CLUTCHLOG(progress,
"Initialize functors...");
57 int main(
const int argc,
char* argv[])
67 log.style(level::critical, 197);
68 log.style(level::error, 202);
69 log.style(level::warning, 208);
70 log.style(level::progress, 34);
71 log.style(level::note, 35);
72 log.style(level::info, 36);
73 log.style(level::debug, 39);
74 log.style(level::xdebug, 45);
75 std::ostringstream format;
76 fmt reset(typo::reset);
77 fmt discreet(fg::black);
78 fmt bold(fmt::typo::bold);
85 const short dark = 238;
86 const short lite = 250;
89 << fmt(dark,lite) <<
"{name}"
90 << fmt(lite,dark) <<
""
91 << fmt(fg::none,dark) <<
"{level_fmt}" <<
" {level_short} " << reset
92 << fmt(dark,bg::none) <<
"" << reset
93 << fmt(dark,bg::none) <<
"{depth_marks}" << reset
96 << discreet(
" {hfill} ")
97 << fmt(dark,bg::none) <<
""
98 << fmt(fg::none,dark) <<
"{level_fmt} {func} "
99 << fmt(lite,dark) <<
""
100 << fmt(dark,lite) <<
"{file}" << reset
101 << fmt(dark,lite) <<
""
102 << fmt(lite,dark) <<
"{line}" << reset
104 log.format(format.str());
110 CLUTCHLOG(warning,
"Log level not indicated, will default to xdebug");
111 log.threshold(level::xdebug);
114 log.threshold(log.level_of(argv[1]));
115 }
catch(std::out_of_range& err) {