48
57
boost::log::core::get()->remove_all_sinks();
49
58
auto logger = boost::log::add_console_log(std::cout);
50
59
logger->set_formatter(formatter);
54
66
void Log(Severity severity, const std::string& message, const boost::optional<Location> &loc) {
55
70
if (auto rec = boost::log::trivial::logger::get().open_record()) {
56
71
boost::log::record_ostream out{rec};
57
72
out << boost::log::add_value(attrs::Severity, severity)