23 #include <momemta/impl/logger/common.h> 24 #include <momemta/impl/logger/formatter.h> 25 #include <momemta/impl/logger/sink.h> 34 logger(sink_ptr single_sink);
40 bool should_log(logging::level::level_enum)
const;
41 void set_level(logging::level::level_enum);
42 logging::level::level_enum level()
const;
44 void set_formatter(formatter_ptr);
47 void flush_on(logging::level::level_enum log_level);
51 const std::vector<sink_ptr>& sinks()
const;
53 template <
typename T>
void log(logging::level::level_enum lvl, T&&);
61 std::vector<sink_ptr> _sinks;
62 formatter_ptr _formatter;
65 std::atomic_size_t _index;
88 ::logging::level::level_enum _lvl;
89 std::ostringstream _stream;
97 void ::logger::logger::log(logging::level::level_enum lvl, T&& msg) {
103 log_msg.index = _index.fetch_add(1, std::memory_order_relaxed);