19 #include <momemta/Logging.h> 24 #include <logger/stdout_sink.h> 27 static logger_ptr init_logger() {
28 bool in_terminal = isatty(fileno(stdout)) == 1;
30 auto sink = sinks::stdout_sink_st::instance();
32 auto l = std::make_shared<logger>(sink);
33 l->flush_on(logging::level::trace);
36 l->set_formatter(std::make_shared<ansi_color_full_formatter>());
43 static logger_ptr s_logger = init_logger();
50 void set_level(::logging::level::level_enum lvl) {
51 ::logger::get()->set_level(lvl);