21 _formatter(
std::make_shared<pattern_formatter>(
"%+")),
23 _flush_level(level::
off),
35 logger(logger_name, sinks_list.begin(), sinks_list.
end())
62 template <
typename...
Args>
73 catch (
const std::exception &ex)
83 template <
typename...
Args>
93 catch (
const std::exception &ex)
114 catch (
const std::exception &ex)
125 template <
typename Arg1,
typename...
Args>
131 template <
typename Arg1,
typename...
Args>
137 template <
typename Arg1,
typename...
Args>
143 template <
typename Arg1,
typename...
Args>
149 template <
typename Arg1,
typename...
Args>
155 template <
typename Arg1,
typename...
Args>
161 template <
typename...
Args>
179 template <
typename Arg1,
typename...
Args>
188 template <
typename Arg1,
typename...
Args>
197 template <
typename Arg1,
typename...
Args>
206 template <
typename Arg1,
typename...
Args>
215 template <
typename Arg1,
typename...
Args>
224 template <
typename Arg1,
typename...
Args>
327 #ifdef SPDLOG_WCHAR_TO_UTF8_SUPPORT 330 template <
typename...
Args>
333 std::wstring_convert<std::codecvt_utf8<wchar_t> > conv;
335 log(lvl, conv.to_bytes(msg));
338 template <
typename...
Args>
347 template <
typename...
Args>
353 template <
typename...
Args>
359 template <
typename...
Args>
366 template <
typename...
Args>
372 template <
typename...
Args>
378 template <
typename...
Args>
388 template <
typename...
Args>
397 template <
typename...
Args>
406 template <
typename...
Args>
415 template <
typename...
Args>
424 template <
typename...
Args>
434 template <
typename...
Args>
443 template <
typename...
Args>
452 template <
typename...
Args>
461 #endif // SPDLOG_WCHAR_TO_UTF8_SUPPORT 501 return msg_level >=
_level.load(std::memory_order_relaxed);
509 #if defined(SPDLOG_ENABLE_MESSAGE_COUNTER) 515 if( sink->should_log( msg.
level))
527 _formatter = std::make_shared<pattern_formatter>(pattern, pattern_time);
547 std::strftime(date_buf,
sizeof(date_buf),
"%Y-%m-%d %H:%M:%S", &tm_time);
550 sinks::stderr_sink_mt::instance()->log(err_msg);
556 const auto flush_level =
_flush_level.load(std::memory_order_relaxed);
void error_if(const bool flag, const char *fmt, const Arg1 &, const Args &...args)
void error(const char *fmt, const Arg1 &, const Args &...args)
virtual log_err_handler error_handler()
void set_formatter(formatter_ptr)
void log_if(const bool flag, level::level_enum lvl, const char *fmt, const Args &...args)
void log(level::level_enum lvl, const char *fmt, const Args &...args)
void write(BasicCStringRef< Char > format, ArgList args)
std::shared_ptr< spdlog::formatter > formatter_ptr
void warn(const char *fmt, const Arg1 &, const Args &...args)
std::shared_ptr< sinks::sink > sink_ptr
void warn_if(const bool flag, const char *fmt, const Arg1 &, const Args &...args)
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
const std::vector< sink_ptr > & sinks() const
spdlog::log_clock::time_point now()
void set_level(level::level_enum)
void trace_if(const bool flag, const char *fmt, const Arg1 &, const Args &...args)
spdlog::level_t _flush_level
void set_pattern(const std::string &, pattern_time_type=pattern_time_type::local)
void trace(const char *fmt, const Arg1 &, const Args &...args)
bool should_log(level::level_enum) const
std::atomic< size_t > _msg_counter
std::tm localtime(const std::time_t &time_tt)
std::vector< sink_ptr > _sinks
void info_if(const bool flag, const char *fmt, const Arg1 &, const Args &...args)
void debug_if(const bool flag, const char *fmt, const Arg1 &, const Args &...args)
fmt::MemoryWriter formatted
void critical_if(const bool flag, const char *fmt, const Arg1 &, const Args &...args)
static SPDLOG_CONSTEXPR const char * eol
void info(const char *fmt, const Arg1 &, const Args &...args)
void critical(const char *fmt, const Arg1 &, const Args &...args)
virtual void set_error_handler(log_err_handler)
std::atomic< time_t > _last_err_time
level::level_enum level() const
std::initializer_list< sink_ptr > sinks_init_list
virtual void _default_err_handler(const std::string &msg)
virtual void _set_formatter(formatter_ptr)
virtual void _sink_it(details::log_msg &)
const std::string & name() const
const Char * c_str() const
void debug(const char *fmt, const Arg1 &, const Args &...args)
bool _should_flush_on(const details::log_msg &)
std::function< void(const std::string &err_msg)> log_err_handler
log_err_handler _err_handler
virtual void _set_pattern(const std::string &, pattern_time_type)
logger(const std::string &logger_name, sink_ptr single_sink)
void flush_on(level::level_enum log_level)