23 [[nodiscard]]
const std::string&
filepath() const noexcept {
return _filepath; }
30 std::string _filepath;
Base class for sinks: handles the level, the pattern and the locking.
Definition ASink.hpp:17
Writes one file per run, keeping the files of the previous runs as backups.
Definition SessionFileSink.hpp:13
~SessionFileSink() override
void flushSink() override
Flushes the output; called with the sink mutex locked.
SessionFileSink(std::string_view filepath, std::size_t maxBackups=DEFAULT_MAX_BACKUPS)
Opens filepath, first renaming the file of the previous run to a dated -backup- copy.
static constexpr std::size_t DEFAULT_MAX_BACKUPS
Definition SessionFileSink.hpp:15
const std::string & filepath() const noexcept
Definition SessionFileSink.hpp:23
void log(const LogMessage &message) override
Writes one message; called with the sink mutex locked.
Thread-safe logging: loggers, sinks, patterns and macros.
Definition Terminal.hpp:8
A log record as passed to the sinks.
Definition LogMessage.hpp:18