28 std::ostream& os, std::ostream& os_for_err) :
37 = (&os == &os_for_err)
45 return m_config->output_whether_should_log(sev, component);
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...
Utility class, each object of which wraps a given ostream and outputs discrete messages to it adorned...
bool logs_asynchronously() const override
Implements interface method by returning false, indicating that this Logger will not need the content...
boost::array< Ostream_log_msg_writer_ptr, 2 > m_os_writers
Stream writers via which to log messages, each element corresponding to a certain set of possible sev...
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...
Config *const m_config
Reference to the config object passed to constructor. Note that object is mutable; see notes on threa...
Simple_ostream_logger(Config *config, std::ostream &os=std::cout, std::ostream &os_for_err=std::cerr)
Constructs logger to subsequently log to the given standard ostream (or 2 thereof).
boost::shared_ptr< Ostream_log_msg_writer > Ostream_log_msg_writer_ptr
Short-hand for ref-counted pointer to a given Ostream_log_msg_writer. See m_os_writers for ref-count ...
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...
util::Mutex_non_recursive m_log_mutex
Mutex protecting against log messages being logged concurrently and thus being garbled.
Flow module providing logging functionality.
Sev
Enumeration containing one of several message severity levels, ordered from highest to lowest.
@ S_WARNING
Message indicates a "bad" condition that is not frequent enough to be of severity Sev::S_TRACE.
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.