24#include <boost/array.hpp>
25#include <boost/shared_ptr.hpp>
116 std::ostream& os = std::cout, std::ostream& os_for_err = std::cerr);
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...
Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
An implementation of Logger that logs messages to the given ostreams (e.g., cout or an ofstream for a...
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.
boost::mutex Mutex_non_recursive
Short-hand for non-reentrant, exclusive mutex. ("Reentrant" = one can lock an already-locked-in-that-...
Basic_string_view< char > String_view
Commonly used char-based Basic_string_view. See its doc header.