29 m_os_writer(*m_config, m_os.os())
36 return m_config->output_whether_should_log(sev, component);
util::String_ostream m_os
Like ostringstream but allows for fast access directly into its internal string buffer.
const std::string & buffer_str() const
Read-only access to the buffer string containing the messages logged thus far.
void do_log(Msg_metadata *metadata, util::String_view msg) override
Implements interface method by synchronously logging the message and some subset of the metadata in a...
Buffer_logger(Config *config)
Constructs logger to subsequently log to a newly constructed internal std::string buffer.
Ostream_log_msg_writer m_os_writer
Wrapper around m_os that will take care of prefacing each message with time stamp,...
util::Mutex_non_recursive m_log_mutex
Mutex protecting against log messages being logged, accessing m_os concurrently and thus corrupting (...
bool should_log(Sev sev, const Component &component) const override
Implements interface method by returning true if the severity and component (which is allowed to be n...
bool logs_asynchronously() const override
Implements interface method by returning false, indicating that this Logger will not need the content...
const std::string buffer_str_copy() const
Returns a copy of buffer_str() in thread-safe fashion.
A light-weight class, each object storing a component payload encoding an enum value from enum type o...
Class used to configure the filtering and logging behavior of Loggers; its use in your custom Loggers...
void log(const Msg_metadata &metadata, util::String_view msg)
Logs to the wrapped ostream the given message and associated metadata like severity and time stamp; p...
const std::string & str() const
Read-only access to the string being wrapped.
Flow module providing logging functionality.
Sev
Enumeration containing one of several message severity levels, ordered from highest to lowest.
boost::unique_lock< Mutex > Lock_guard
Short-hand for advanced-capability RAII lock guard for any mutex, ensuring exclusive ownership of tha...
Basic_string_view< char > String_view
Commonly used char-based Basic_string_view. See its doc header.