65 Config* config,
const fs::path& log_path);
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...
Convenience class that simply stores a Logger and/or Component passed into a constructor; and returns...
Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
Utility class, each object of which wraps a given ostream and outputs discrete messages to it adorned...
An internal-use implementation of Logger that logs messages to a given file-system path,...
bool m_reopening
Starts at false, becomes true at entry to log_flush_and_reopen(), then becomes false again.
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...
bool logs_asynchronously() const override
Implements interface method by returning false, indicating that this Logger will not need the content...
~Serial_file_logger() override
Flushes out anything buffered, returns resources/closes output file(s); then returns.
void log_flush_and_reopen()
Causes the log at the file-system path to be flushed/closed (if needed) and re-opened; this will occu...
Config *const m_config
See Async_file_logger::m_config.
Ostream_log_msg_writer m_ofs_writer
Stream writer via which to log messages to m_ofs.
Serial_file_logger(Logger *backup_logger_ptr, Config *config, const fs::path &log_path)
Constructs logger to subsequently log to the given file-system path.
const fs::path m_log_path
File-system path to which to write subsequently.
fs::ofstream m_ofs
The file to which to write. Because only the worker thread ever accesses it, no mutex is needed.
bool should_log(Sev sev, const Component &component) const override
See Async_file_logger::should_log().
Flow module providing logging functionality.
Sev
Enumeration containing one of several message severity levels, ordered from highest to lowest.
Basic_string_view< char > String_view
Commonly used char-based Basic_string_view. See its doc header.