11 #ifndef META_LOGGER_H_
12 #define META_LOGGER_H_
62 case severity_level::progress:
64 case severity_level::trace:
66 case severity_level::debug:
68 case severity_level::info:
70 case severity_level::warning:
72 case severity_level::error:
74 case severity_level::fatal:
97 const std::string&
file)
173 const std::string&
file()
const
243 [](
const log_line&) {
return true; },
266 {
return ll.severity() >= sev; })
298 namespace sc = std::chrono;
300 auto time = sc::system_clock::now();
301 auto since_epoch = time.time_since_epoch();
302 auto unix_time = sc::duration_cast<sc::seconds>(since_epoch);
304 std::stringstream ss;
305 ss << unix_time.count();
308 std::stringstream sev;
310 ss << std::setw(10) << std::left << sev.str();
316 ss <<
"(" << line.
file() <<
":" << line.
line() <<
")";
355 sinks_.emplace_back(std::move(s));
411 = logging::logger::severity_level::trace)
415 return ll.severity() == logger::severity_level::progress;
417 return " " + ll.str();
426 logging::logger::log_line(logging::get_logger(), \
427 logging::logger::severity_level::sev, __LINE__, \
429 #define ENDLG logging::logger::log_line::endlg
430 #define LOG_FUNCTION_START() \
431 LOG(trace) << "entering " << __func__ << "()" << ENDLG