16 #include "sinks/base_sink.h" 27 logger(
const std::string &name, sink_ptr single_sink);
28 logger(
const std::string &name, sinks_init_list sinks);
31 logger(std::string name,
const It &begin,
const It &end);
38 template<
typename... Args>
39 void log(level::level_enum lvl,
const char *
fmt,
const Args &... args);
41 template<
typename... Args>
42 void log(level::level_enum lvl,
const char *msg);
44 template<
typename Arg1,
typename... Args>
45 void trace(
const char *fmt,
const Arg1 &,
const Args &... args);
47 template<
typename Arg1,
typename... Args>
48 void debug(
const char *fmt,
const Arg1 &,
const Args &... args);
50 template<
typename Arg1,
typename... Args>
51 void info(
const char *fmt,
const Arg1 &,
const Args &... args);
53 template<
typename Arg1,
typename... Args>
54 void warn(
const char *fmt,
const Arg1 &,
const Args &... args);
56 template<
typename Arg1,
typename... Args>
57 void error(
const char *fmt,
const Arg1 &,
const Args &... args);
59 template<
typename Arg1,
typename... Args>
60 void critical(
const char *fmt,
const Arg1 &,
const Args &... args);
62 #ifdef SPDLOG_WCHAR_TO_UTF8_SUPPORT 63 template<
typename... Args>
64 void log(level::level_enum lvl,
const wchar_t *msg);
66 template<
typename... Args>
67 void log(level::level_enum lvl,
const wchar_t *fmt,
const Args &... args);
69 template<
typename... Args>
70 void trace(
const wchar_t *fmt,
const Args &... args);
72 template<
typename... Args>
73 void debug(
const wchar_t *fmt,
const Args &... args);
75 template<
typename... Args>
76 void info(
const wchar_t *fmt,
const Args &... args);
78 template<
typename... Args>
79 void warn(
const wchar_t *fmt,
const Args &... args);
81 template<
typename... Args>
82 void error(
const wchar_t *fmt,
const Args &... args);
84 template<
typename... Args>
85 void critical(
const wchar_t *fmt,
const Args &... args);
86 #endif // SPDLOG_WCHAR_TO_UTF8_SUPPORT 89 void log(level::level_enum lvl,
const T &);
92 void trace(
const T &msg);
95 void debug(
const T &msg);
98 void info(
const T &msg);
101 void warn(
const T &msg);
104 void error(
const T &msg);
107 void critical(
const T &msg);
109 bool should_log(level::level_enum msg_level)
const;
110 void set_level(level::level_enum log_level);
111 level::level_enum level()
const;
112 const std::string &name()
const;
113 void set_pattern(
const std::string &pattern, pattern_time_type pattern_time = pattern_time_type::local);
114 void set_formatter(formatter_ptr msg_formatter);
117 void flush_on(level::level_enum log_level);
119 virtual void flush();
121 const std::vector<sink_ptr> &sinks()
const;
124 virtual void set_error_handler(log_err_handler err_handler);
125 virtual log_err_handler error_handler();
129 virtual void _set_pattern(
const std::string &pattern, pattern_time_type pattern_time);
130 virtual void _set_formatter(formatter_ptr msg_formatter);
133 virtual void _default_err_handler(
const std::string &msg);
141 const std::string _name;
142 std::vector<sink_ptr> _sinks;
143 formatter_ptr _formatter;
146 log_err_handler _err_handler;
147 std::atomic<time_t> _last_err_time;
148 std::atomic<size_t> _msg_counter;
152 #include "details/logger_impl.h"
Definition: async_logger.h:26
Definition: null_mutex.h:23