Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gabime/spdlog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeeyong Um <conr2d@gmail.com>2022-05-07 20:16:31 +0300
committerJeeyong Um <conr2d@gmail.com>2022-05-07 20:16:31 +0300
commitc03c925e295a7e67c64afedaf28dfb7f354cedb1 (patch)
tree68090df30cb2cea2c46c23975b1ffc1829098f49 /include
parent38929f856db663ec2abb938bb5cb88b24ed2c9b8 (diff)
Copy the value of need_localtime when cloning pattern_formatter
Diffstat (limited to 'include')
-rw-r--r--include/spdlog/pattern_formatter-inl.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h
index 0d36fc85..2559454b 100644
--- a/include/spdlog/pattern_formatter-inl.h
+++ b/include/spdlog/pattern_formatter-inl.h
@@ -1051,7 +1051,9 @@ SPDLOG_INLINE std::unique_ptr<formatter> pattern_formatter::clone() const
{
cloned_custom_formatters[it.first] = it.second->clone();
}
- return details::make_unique<pattern_formatter>(pattern_, pattern_time_type_, eol_, std::move(cloned_custom_formatters));
+ auto cloned = details::make_unique<pattern_formatter>(pattern_, pattern_time_type_, eol_, std::move(cloned_custom_formatters));
+ cloned->need_localtime(need_localtime_);
+ return cloned;
}
SPDLOG_INLINE void pattern_formatter::format(const details::log_msg &msg, memory_buf_t &dest)