From 46cf0f86b83f22e92191f7eac080923b0631c97d Mon Sep 17 00:00:00 2001 From: gabime Date: Sun, 24 Jun 2018 01:55:30 +0300 Subject: [PATCH] Added set_pattern() to sink class --- include/spdlog/sinks/sink.h | 5 +++++ 1 file changed, 5 insertions(+) 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);