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 = 245;
88 std::vector<clutchlog::fmt> greys = {fmt(15)};
89 for(
unsigned short i=255; i>231; i-=3) {
90 greys.push_back( fmt(i) );
92 log.depth_styles(greys);
95 << fmt(dark,lite) <<
"{name}"
96 << fmt(fg::none,lite,typo::inverse) <<
"{level_fmt}"
97 << fmt(fg::none,bg::black,typo::inverse) <<
"{level_fmt}" <<
" {level_short} " << reset
98 <<
"{level_fmt} " << reset
99 << fmt(dark,bg::none) <<
"{depth_marks}"
104 <<
"{funchash_fmt} <-{hfill}"
105 << fmt(dark,bg::none) <<
""
106 << fmt(fg::none,dark) <<
"{funchash_fmt}{func} "
107 << fmt(lite,dark) <<
""
108 << fmt(dark,lite) <<
"{filehash_fmt}{file}" << reset
109 << fmt(dark,lite) <<
""
110 << fmt(lite,dark) <<
"{line}" << reset
112 log.format(format.str());
118 CLUTCHLOG(warning,
"Log level not indicated, will default to xdebug");
119 log.threshold(level::xdebug);
122 log.threshold(log.level_of(argv[1]));
123 }
catch(std::out_of_range& err) {