Livox SDK API  V2.2.0
spdlog Namespace Reference

Namespaces

 details
 
 level
 
 sinks
 

Classes

struct  async_factory_impl
 
class  async_logger
 
class  formatter
 
class  logger
 
class  pattern_formatter
 
struct  source_loc
 
class  spdlog_ex
 
struct  synchronous_factory
 

Typedefs

using async_factory = async_factory_impl< async_overflow_policy::block >
 
using async_factory_nonblock = async_factory_impl< async_overflow_policy::overrun_oldest >
 
using log_clock = std::chrono::system_clock
 
using sink_ptr = std::shared_ptr< sinks::sink >
 
using sinks_init_list = std::initializer_list< sink_ptr >
 
using log_err_handler = std::function< void(const std::string &err_msg)>
 
using string_view_t = fmt::string_view
 
using level_t = std::atomic< int >
 
using filename_t = std::string
 
using default_factory = synchronous_factory
 

Enumerations

enum  async_overflow_policy { async_overflow_policy::block, async_overflow_policy::overrun_oldest }
 
enum  pattern_time_type { pattern_time_type::local, pattern_time_type::utc }
 

Functions

template<typename Sink , typename... SinkArgs>
std::shared_ptr< spdlog::loggercreate_async (std::string logger_name, SinkArgs &&...sink_args)
 
template<typename Sink , typename... SinkArgs>
std::shared_ptr< spdlog::loggercreate_async_nb (std::string logger_name, SinkArgs &&...sink_args)
 
void init_thread_pool (size_t q_size, size_t thread_count)
 
std::shared_ptr< spdlog::details::thread_poolthread_pool ()
 
template<typename Container >
details::bytes_range< typename Container::const_iterator > to_hex (const Container &container)
 
template<typename It >
details::bytes_range< It > to_hex (const It range_begin, const It range_end)
 
template<typename Factory = default_factory>
std::shared_ptr< loggerandroid_logger_mt (const std::string &logger_name, const std::string &tag="spdlog")
 
template<typename Factory = default_factory>
std::shared_ptr< loggerandroid_logger_st (const std::string &logger_name, const std::string &tag="spdlog")
 
template<typename Factory = default_factory>
std::shared_ptr< loggerbasic_logger_mt (const std::string &logger_name, const filename_t &filename, bool truncate=false)
 
template<typename Factory = default_factory>
std::shared_ptr< loggerbasic_logger_st (const std::string &logger_name, const filename_t &filename, bool truncate=false)
 
template<typename Factory = default_factory>
std::shared_ptr< loggerdaily_logger_mt (const std::string &logger_name, const filename_t &filename, int hour=0, int minute=0, bool truncate=false)
 
template<typename Factory = default_factory>
std::shared_ptr< loggerdaily_logger_st (const std::string &logger_name, const filename_t &filename, int hour=0, int minute=0, bool truncate=false)
 
template<typename Factory = default_factory>
std::shared_ptr< loggernull_logger_mt (const std::string &logger_name)
 
template<typename Factory = default_factory>
std::shared_ptr< loggernull_logger_st (const std::string &logger_name)
 
template<typename Factory = default_factory>
std::shared_ptr< loggerrotating_logger_mt (const std::string &logger_name, const filename_t &filename, size_t max_file_size, size_t max_files, bool rotate_on_open=false)
 
template<typename Factory = default_factory>
std::shared_ptr< loggerrotating_logger_st (const std::string &logger_name, const filename_t &filename, size_t max_file_size, size_t max_files, bool rotate_on_open=false)
 
template<typename Factory = default_factory>
std::shared_ptr< loggerstdout_color_mt (const std::string &logger_name)
 
template<typename Factory = default_factory>
std::shared_ptr< loggerstdout_color_st (const std::string &logger_name)
 
template<typename Factory = default_factory>
std::shared_ptr< loggerstderr_color_mt (const std::string &logger_name)
 
template<typename Factory = default_factory>
std::shared_ptr< loggerstderr_color_st (const std::string &logger_name)
 
template<typename Factory = default_factory>
std::shared_ptr< loggerstdout_logger_mt (const std::string &logger_name)
 
template<typename Factory = default_factory>
std::shared_ptr< loggerstdout_logger_st (const std::string &logger_name)
 
template<typename Factory = default_factory>
std::shared_ptr< loggerstderr_logger_mt (const std::string &logger_name)
 
template<typename Factory = default_factory>
std::shared_ptr< loggerstderr_logger_st (const std::string &logger_name)
 
template<typename Factory = default_factory>
std::shared_ptr< loggersyslog_logger_mt (const std::string &logger_name, const std::string &syslog_ident="", int syslog_option=0, int syslog_facility=(1<< 3))
 
template<typename Factory = default_factory>
std::shared_ptr< loggersyslog_logger_st (const std::string &logger_name, const std::string &syslog_ident="", int syslog_option=0, int syslog_facility=(1<< 3))
 
template<typename Sink , typename... SinkArgs>
std::shared_ptr< spdlog::loggercreate (std::string logger_name, SinkArgs &&...sink_args)
 
std::shared_ptr< loggerget (const std::string &name)
 
void set_formatter (std::unique_ptr< spdlog::formatter > formatter)
 
void set_pattern (std::string pattern, pattern_time_type time_type=pattern_time_type::local)
 
void set_level (level::level_enum log_level)
 
void flush_on (level::level_enum log_level)
 
void flush_every (std::chrono::seconds interval)
 
void set_error_handler (log_err_handler handler)
 
void register_logger (std::shared_ptr< logger > logger)
 
void apply_all (const std::function< void(std::shared_ptr< logger >)> &fun)
 
void drop (const std::string &name)
 
void drop_all ()
 
void shutdown ()
 
void set_automatic_registration (bool automatic_registation)
 
std::shared_ptr< spdlog::loggerdefault_logger ()
 
spdlog::loggerdefault_logger_raw ()
 
void set_default_logger (std::shared_ptr< spdlog::logger > default_logger)
 
template<typename... Args>
void log (source_loc source, level::level_enum lvl, const char *fmt, const Args &...args)
 
template<typename... Args>
void log (level::level_enum lvl, const char *fmt, const Args &...args)
 
template<typename... Args>
void trace (const char *fmt, const Args &...args)
 
template<typename... Args>
void debug (const char *fmt, const Args &...args)
 
template<typename... Args>
void info (const char *fmt, const Args &...args)
 
template<typename... Args>
void warn (const char *fmt, const Args &...args)
 
template<typename... Args>
void error (const char *fmt, const Args &...args)
 
template<typename... Args>
void critical (const char *fmt, const Args &...args)
 
template<typename T >
void log (level::level_enum lvl, const T &msg)
 
template<typename T >
void trace (const T &msg)
 
template<typename T >
void debug (const T &msg)
 
template<typename T >
void info (const T &msg)
 
template<typename T >
void warn (const T &msg)
 
template<typename T >
void error (const T &msg)
 
template<typename T >
void critical (const T &msg)
 

Typedef Documentation

Definition at line 60 of file async.h.

Definition at line 37 of file spdlog.h.

using spdlog::filename_t = typedef std::string

Definition at line 205 of file common.h.

using spdlog::level_t = typedef std::atomic<int>

Definition at line 94 of file common.h.

using spdlog::log_clock = typedef std::chrono::system_clock

Definition at line 79 of file common.h.

using spdlog::log_err_handler = typedef std::function<void(const std::string &err_msg)>

Definition at line 82 of file common.h.

using spdlog::sink_ptr = typedef std::shared_ptr<sinks::sink>

Definition at line 80 of file common.h.

using spdlog::sinks_init_list = typedef std::initializer_list<sink_ptr>

Definition at line 81 of file common.h.

Definition at line 88 of file common.h.

Enumeration Type Documentation

Enumerator
block 
overrun_oldest 

Definition at line 32 of file async_logger.h.

Enumerator
local 
utc 

Definition at line 166 of file common.h.

Function Documentation

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::android_logger_mt ( const std::string &  logger_name,
const std::string &  tag = "spdlog" 
)
inline

Definition at line 110 of file android_sink.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::android_logger_st ( const std::string &  logger_name,
const std::string &  tag = "spdlog" 
)
inline

Definition at line 116 of file android_sink.h.

void spdlog::apply_all ( const std::function< void(std::shared_ptr< logger >)> &  fun)
inline

Definition at line 105 of file spdlog.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::basic_logger_mt ( const std::string &  logger_name,
const filename_t filename,
bool  truncate = false 
)
inline

Definition at line 64 of file basic_file_sink.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::basic_logger_st ( const std::string &  logger_name,
const filename_t filename,
bool  truncate = false 
)
inline

Definition at line 70 of file basic_file_sink.h.

template<typename Sink , typename... SinkArgs>
std::shared_ptr<spdlog::logger> spdlog::create ( std::string  logger_name,
SinkArgs &&...  sink_args 
)
inline

Definition at line 45 of file spdlog.h.

template<typename Sink , typename... SinkArgs>
std::shared_ptr<spdlog::logger> spdlog::create_async ( std::string  logger_name,
SinkArgs &&...  sink_args 
)
inline

Definition at line 64 of file async.h.

template<typename Sink , typename... SinkArgs>
std::shared_ptr<spdlog::logger> spdlog::create_async_nb ( std::string  logger_name,
SinkArgs &&...  sink_args 
)
inline

Definition at line 70 of file async.h.

template<typename... Args>
void spdlog::critical ( const char *  fmt,
const Args &...  args 
)
inline

Definition at line 207 of file spdlog.h.

template<typename T >
void spdlog::critical ( const T &  msg)
inline

Definition at line 249 of file spdlog.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::daily_logger_mt ( const std::string &  logger_name,
const filename_t filename,
int  hour = 0,
int  minute = 0,
bool  truncate = false 
)
inline

Definition at line 129 of file daily_file_sink.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::daily_logger_st ( const std::string &  logger_name,
const filename_t filename,
int  hour = 0,
int  minute = 0,
bool  truncate = false 
)
inline

Definition at line 136 of file daily_file_sink.h.

template<typename... Args>
void spdlog::debug ( const char *  fmt,
const Args &...  args 
)
inline

Definition at line 183 of file spdlog.h.

template<typename T >
void spdlog::debug ( const T &  msg)
inline

Definition at line 225 of file spdlog.h.

std::shared_ptr<spdlog::logger> spdlog::default_logger ( )
inline

Definition at line 149 of file spdlog.h.

spdlog::logger* spdlog::default_logger_raw ( )
inline

Definition at line 154 of file spdlog.h.

void spdlog::drop ( const std::string &  name)
inline

Definition at line 111 of file spdlog.h.

void spdlog::drop_all ( )
inline

Definition at line 117 of file spdlog.h.

template<typename... Args>
void spdlog::error ( const char *  fmt,
const Args &...  args 
)
inline

Definition at line 201 of file spdlog.h.

template<typename T >
void spdlog::error ( const T &  msg)
inline

Definition at line 243 of file spdlog.h.

void spdlog::flush_every ( std::chrono::seconds  interval)
inline

Definition at line 85 of file spdlog.h.

void spdlog::flush_on ( level::level_enum  log_level)
inline

Definition at line 78 of file spdlog.h.

std::shared_ptr<logger> spdlog::get ( const std::string &  name)
inline

Definition at line 53 of file spdlog.h.

template<typename... Args>
void spdlog::info ( const char *  fmt,
const Args &...  args 
)
inline

Definition at line 189 of file spdlog.h.

template<typename T >
void spdlog::info ( const T &  msg)
inline

Definition at line 231 of file spdlog.h.

void spdlog::init_thread_pool ( size_t  q_size,
size_t  thread_count 
)
inline

Definition at line 76 of file async.h.

template<typename... Args>
void spdlog::log ( source_loc  source,
level::level_enum  lvl,
const char *  fmt,
const Args &...  args 
)
inline

Definition at line 165 of file spdlog.h.

template<typename... Args>
void spdlog::log ( level::level_enum  lvl,
const char *  fmt,
const Args &...  args 
)
inline

Definition at line 171 of file spdlog.h.

template<typename T >
void spdlog::log ( level::level_enum  lvl,
const T &  msg 
)
inline

Definition at line 213 of file spdlog.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::null_logger_mt ( const std::string &  logger_name)
inline

Definition at line 34 of file null_sink.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::null_logger_st ( const std::string &  logger_name)
inline

Definition at line 42 of file null_sink.h.

void spdlog::register_logger ( std::shared_ptr< logger logger)
inline

Definition at line 97 of file spdlog.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::rotating_logger_mt ( const std::string &  logger_name,
const filename_t filename,
size_t  max_file_size,
size_t  max_files,
bool  rotate_on_open = false 
)
inline

Definition at line 152 of file rotating_file_sink.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::rotating_logger_st ( const std::string &  logger_name,
const filename_t filename,
size_t  max_file_size,
size_t  max_files,
bool  rotate_on_open = false 
)
inline

Definition at line 159 of file rotating_file_sink.h.

void spdlog::set_automatic_registration ( bool  automatic_registation)
inline

Definition at line 129 of file spdlog.h.

void spdlog::set_default_logger ( std::shared_ptr< spdlog::logger default_logger)
inline

Definition at line 159 of file spdlog.h.

void spdlog::set_error_handler ( log_err_handler  handler)
inline

Definition at line 91 of file spdlog.h.

void spdlog::set_formatter ( std::unique_ptr< spdlog::formatter formatter)
inline

Definition at line 59 of file spdlog.h.

void spdlog::set_level ( level::level_enum  log_level)
inline

Definition at line 72 of file spdlog.h.

void spdlog::set_pattern ( std::string  pattern,
pattern_time_type  time_type = pattern_time_type::local 
)
inline

Definition at line 66 of file spdlog.h.

void spdlog::shutdown ( )
inline

Definition at line 123 of file spdlog.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::stderr_color_mt ( const std::string &  logger_name)
inline

Definition at line 46 of file stdout_color_sinks.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::stderr_color_st ( const std::string &  logger_name)
inline

Definition at line 52 of file stdout_color_sinks.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::stderr_logger_mt ( const std::string &  logger_name)
inline

Definition at line 92 of file stdout_sinks.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::stderr_logger_st ( const std::string &  logger_name)
inline

Definition at line 98 of file stdout_sinks.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::stdout_color_mt ( const std::string &  logger_name)
inline

Definition at line 34 of file stdout_color_sinks.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::stdout_color_st ( const std::string &  logger_name)
inline

Definition at line 40 of file stdout_color_sinks.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::stdout_logger_mt ( const std::string &  logger_name)
inline

Definition at line 80 of file stdout_sinks.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::stdout_logger_st ( const std::string &  logger_name)
inline

Definition at line 86 of file stdout_sinks.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::syslog_logger_mt ( const std::string &  logger_name,
const std::string &  syslog_ident = "",
int  syslog_option = 0,
int  syslog_facility = (1 << 3) 
)
inline

Definition at line 82 of file syslog_sink.h.

template<typename Factory = default_factory>
std::shared_ptr<logger> spdlog::syslog_logger_st ( const std::string &  logger_name,
const std::string &  syslog_ident = "",
int  syslog_option = 0,
int  syslog_facility = (1 << 3) 
)
inline

Definition at line 89 of file syslog_sink.h.

std::shared_ptr<spdlog::details::thread_pool> spdlog::thread_pool ( )
inline

Definition at line 83 of file async.h.

template<typename Container >
details::bytes_range<typename Container::const_iterator> spdlog::to_hex ( const Container &  container)
inline

Definition at line 53 of file bin_to_hex.h.

template<typename It >
details::bytes_range<It> spdlog::to_hex ( const It  range_begin,
const It  range_end 
)
inline

Definition at line 62 of file bin_to_hex.h.

template<typename... Args>
void spdlog::trace ( const char *  fmt,
const Args &...  args 
)
inline

Definition at line 177 of file spdlog.h.

template<typename T >
void spdlog::trace ( const T &  msg)
inline

Definition at line 219 of file spdlog.h.

template<typename... Args>
void spdlog::warn ( const char *  fmt,
const Args &...  args 
)
inline

Definition at line 195 of file spdlog.h.

template<typename T >
void spdlog::warn ( const T &  msg)
inline

Definition at line 237 of file spdlog.h.