19 std::string_view decorator_name)
20 : wrapped_(std::move(wrapped)), decorator_name_(decorator_name) {
22 throw std::invalid_argument(
"decorator_writer_base: wrapped writer cannot be nullptr");
const std::string & decorator_name() const noexcept
Get the decorator name.
const log_writer_interface * get_wrapped_writer() const noexcept
Get the wrapped writer (const version)
std::string decorator_name_
common::VoidResult flush() override
Flush the wrapped writer.
std::string get_name() const override
Get the name of this writer.
std::unique_ptr< log_writer_interface > wrapped_
decorator_writer_base(std::unique_ptr< log_writer_interface > wrapped, std::string_view decorator_name)
Construct a decorator writer base.
bool is_healthy() const override
Check if the writer is healthy.
log_writer_interface & wrapped() noexcept
Access the wrapped writer (non-const)
Base interface for all log writers and decorators.
Base class for decorator pattern writers.