mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-24 14:42:13 +08:00
Added set_pattern() to sink class
This commit is contained in:
parent
e574f57511
commit
46cf0f86b8
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user