19 [[nodiscard]]
const std::string&
filepath() const noexcept {
return _filepath; }
26 std::string _filepath;
Base class for sinks: handles the level, the pattern and the locking.
Definition ASink.hpp:17
Appends messages to a file.
Definition FileSink.hpp:12
void flushSink() override
Flushes the output; called with the sink mutex locked.
FileSink(std::string_view filepath, bool truncate=false)
Opens filepath, emptying it first if truncate is true.
void log(const LogMessage &message) override
Writes one message; called with the sink mutex locked.
const std::string & filepath() const noexcept
Definition FileSink.hpp:19
Thread-safe logging: loggers, sinks, patterns and macros.
Definition Terminal.hpp:8
A log record as passed to the sinks.
Definition LogMessage.hpp:18