diff --git a/include/spdlog/sinks/sink.h b/include/spdlog/sinks/sink.h index e6fb533e..307afe21 100644 --- a/include/spdlog/sinks/sink.h +++ b/include/spdlog/sinks/sink.h @@ -48,6 +48,11 @@ public: return static_cast(level_.load(std::memory_order_relaxed)); } + void set_pattern(const std::string& pattern) + { + formatter_ = std::unique_ptr(new pattern_formatter(pattern)); + } + void set_formatter(std::unique_ptr sink_formatter) { formatter_ = std::move(sink_formatter);