mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 02:19:35 +08:00
Allow overriding need_localtime for custom formatter
This commit is contained in:
@@ -1081,6 +1081,11 @@ SPDLOG_INLINE void pattern_formatter::set_pattern(std::string pattern)
|
||||
compile_pattern_(pattern_);
|
||||
}
|
||||
|
||||
SPDLOG_INLINE void pattern_formatter::need_localtime(bool need)
|
||||
{
|
||||
need_localtime_ = need;
|
||||
}
|
||||
|
||||
SPDLOG_INLINE std::tm pattern_formatter::get_time_(const details::log_msg &msg)
|
||||
{
|
||||
if (pattern_time_type_ == pattern_time_type::local)
|
||||
|
Reference in New Issue
Block a user