Commit 46cf0f86 authored by gabime's avatar gabime

Added set_pattern() to sink class

parent e574f575
...@@ -48,6 +48,11 @@ public: ...@@ -48,6 +48,11 @@ public:
return static_cast<spdlog::level::level_enum>(level_.load(std::memory_order_relaxed)); return static_cast<spdlog::level::level_enum>(level_.load(std::memory_order_relaxed));
} }
void set_pattern(const std::string& pattern)
{
formatter_ = std::unique_ptr<spdlog::formatter>(new pattern_formatter(pattern));
}
void set_formatter(std::unique_ptr<spdlog::formatter> sink_formatter) void set_formatter(std::unique_ptr<spdlog::formatter> sink_formatter)
{ {
formatter_ = std::move(sink_formatter); formatter_ = std::move(sink_formatter);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment