3 #include "../clutchlog/clutchlog.h"
7 CLUTCHLOG(progress,
"Reset data structures...");
10 CLUTCHLOG(critical,
"Impossible to reset, I cannot recover.");
15 CLUTCHLOG(note,
"Filling up data of size: " << 0);
16 CLUTCHLOG(error,
"Cannot parse input, I will reset stuff.");
18 CLUTCHLOG(xdebug,
"Last seen state: " << 0);
29 CLUTCHLOG(progress,
"Initialize data structures...");
31 CLUTCHLOG(progress,
"Initialize functors...");
36 int main(
const int argc,
char* argv[])
40 log.style(clutchlog::level::critical,
41 clutchlog::fmt::fg::red);
42 log.style(clutchlog::level::error,
43 clutchlog::fmt::fg::red);
44 log.style(clutchlog::level::warning,
45 clutchlog::fmt::fg::magenta);
46 log.style(clutchlog::level::progress,
47 clutchlog::fmt::fg::yellow);
48 log.style(clutchlog::level::note,
49 clutchlog::fmt::fg::green);
50 log.style(clutchlog::level::info,
51 clutchlog::fmt::fg::magenta);
52 log.style(clutchlog::level::debug,
53 clutchlog::fmt::fg::cyan);
54 log.style(clutchlog::level::xdebug,
55 clutchlog::fmt::fg::blue);
56 std::ostringstream format;
60 format <<
"{level_fmt}"
64 << discreet(
" {hfill} ")
65 <<
"{level_fmt}{func}"
67 <<
"{level_fmt}{file}"
69 <<
"{level_fmt}{line}"
71 log.format(format.str());
76 log.threshold(clutchlog::level::warning);
79 CLUTCHLOG(warning,
"Log level not indicated, will default to xdebug");
80 log.threshold(clutchlog::level::xdebug);
83 log.threshold(log.level_of(argv[1]));
84 }
catch(std::out_of_range& err) {