10 #define SPDLOG_VERSION "0.13.0" 108 #ifdef SPDLOG_ENABLE_SYSLOG 109 std::shared_ptr<logger> syslog_logger(
const std::string& logger_name,
const std::string& ident =
"",
int syslog_option = 0);
112 #if defined(__ANDROID__) 113 std::shared_ptr<logger> android_logger(
const std::string& logger_name,
const std::string& tag =
"spdlog");
122 std::shared_ptr<logger>
create(
const std::string& logger_name,
const It& sinks_begin,
const It& sinks_end);
128 template <
typename Sink,
typename...
Args>
137 std::shared_ptr<logger>
create_async(
const std::string& logger_name,
const It& sinks_begin,
const It& sinks_end,
size_t queue_size,
const async_overflow_policy overflow_policy =
async_overflow_policy::block_retry,
const std::function<
void()>& worker_warmup_cb =
nullptr,
const std::chrono::milliseconds& flush_interval_ms = std::chrono::milliseconds::zero(),
const std::function<
void()>& worker_teardown_cb =
nullptr);
145 void apply_all(std::function<
void(std::shared_ptr<logger>)> fun);
168 #ifdef SPDLOG_TRACE_ON 169 #define SPDLOG_STR_H(x) #x 170 #define SPDLOG_STR_HELPER(x) SPDLOG_STR_H(x) 171 #define SPDLOG_TRACE(logger, ...) logger->trace("[" __FILE__ " line #" SPDLOG_STR_HELPER(__LINE__) "] " __VA_ARGS__) 172 #define SPDLOG_TRACE_IF(logger, flag, ...) logger->trace_if(flag, "[" __FILE__ " line #" SPDLOG_STR_HELPER(__LINE__) "] " __VA_ARGS__) 174 #define SPDLOG_TRACE(logger, ...) 175 #define SPDLOG_TRACE_IF(logger, flag, ...) 178 #ifdef SPDLOG_DEBUG_ON 179 #define SPDLOG_DEBUG(logger, ...) logger->debug(__VA_ARGS__) 180 #define SPDLOG_DEBUG_IF(logger, flag, ...) logger->debug_if(flag, __VA_ARGS__) 182 #define SPDLOG_DEBUG(logger, ...) 183 #define SPDLOG_DEBUG_IF(logger, flag, ...) void set_async_mode(size_t queue_size, const async_overflow_policy overflow_policy=async_overflow_policy::block_retry, const std::function< void()> &worker_warmup_cb=nullptr, const std::chrono::milliseconds &flush_interval_ms=std::chrono::milliseconds::zero(), const std::function< void()> &worker_teardown_cb=nullptr)
void apply_all(std::function< void(std::shared_ptr< logger >)> fun)
void set_formatter(formatter_ptr f)
std::shared_ptr< spdlog::formatter > formatter_ptr
void drop(const std::string &name)
std::shared_ptr< sinks::sink > sink_ptr
void set_pattern(const std::string &format_string)
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
void set_error_handler(log_err_handler)
std::shared_ptr< logger > stdout_color_mt(const std::string &logger_name)
std::shared_ptr< logger > stderr_color_st(const std::string &logger_name)
std::shared_ptr< logger > daily_logger_st(const std::string &logger_name, const filename_t &filename, int hour=0, int minute=0)
std::shared_ptr< logger > daily_logger_mt(const std::string &logger_name, const filename_t &filename, int hour=0, int minute=0)
std::shared_ptr< logger > create(const std::string &logger_name, const sink_ptr &sink)
std::shared_ptr< logger > create_async(const std::string &logger_name, const sink_ptr &sink, size_t queue_size, const async_overflow_policy overflow_policy=async_overflow_policy::block_retry, const std::function< void()> &worker_warmup_cb=nullptr, const std::chrono::milliseconds &flush_interval_ms=std::chrono::milliseconds::zero(), const std::function< void()> &worker_teardown_cb=nullptr)
void register_logger(std::shared_ptr< logger > logger)
std::shared_ptr< logger > stderr_logger_st(const std::string &logger_name)
std::shared_ptr< logger > basic_logger_st(const std::string &logger_name, const filename_t &filename, bool truncate=false)
std::shared_ptr< logger > stdout_logger_mt(const std::string &logger_name)
std::initializer_list< sink_ptr > sinks_init_list
std::shared_ptr< logger > stderr_logger_mt(const std::string &logger_name)
std::shared_ptr< logger > stdout_color_st(const std::string &logger_name)
std::shared_ptr< logger > rotating_logger_mt(const std::string &logger_name, const filename_t &filename, size_t max_file_size, size_t max_files)
std::function< void(const std::string &err_msg)> log_err_handler
std::shared_ptr< logger > stderr_color_mt(const std::string &logger_name)
std::shared_ptr< logger > rotating_logger_st(const std::string &logger_name, const filename_t &filename, size_t max_file_size, size_t max_files)
std::shared_ptr< logger > stdout_logger_st(const std::string &logger_name)
void set_level(level::level_enum log_level)
std::shared_ptr< logger > basic_logger_mt(const std::string &logger_name, const filename_t &filename, bool truncate=false)