WireCellToolkit
Wire Cell Simulation, Signal Process and Reconstruction Toolki for Liquid Argon Detectors
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)
 
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)
 
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

◆ async_factory

Definition at line 60 of file async.h.

◆ async_factory_nonblock

◆ default_factory

Definition at line 37 of file spdlog.h.

◆ filename_t

using spdlog::filename_t = typedef std::string

Definition at line 202 of file common.h.

◆ level_t

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

Definition at line 94 of file common.h.

◆ log_clock

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

Definition at line 79 of file common.h.

◆ log_err_handler

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

Definition at line 82 of file common.h.

◆ sink_ptr

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

Definition at line 80 of file common.h.

◆ sinks_init_list

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

Definition at line 81 of file common.h.

◆ string_view_t

Definition at line 88 of file common.h.

Enumeration Type Documentation

◆ async_overflow_policy

Enumerator
block 
overrun_oldest 

Definition at line 32 of file async_logger.h.

◆ pattern_time_type

Enumerator
local 
utc 

Definition at line 163 of file common.h.

Function Documentation

◆ android_logger_mt()

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.

◆ android_logger_st()

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.

◆ apply_all()

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

Definition at line 105 of file spdlog.h.

Here is the call graph for this function:

◆ basic_logger_mt()

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 59 of file basic_file_sink.h.

◆ basic_logger_st()

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 65 of file basic_file_sink.h.

◆ create()

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.

Here is the caller graph for this function:

◆ create_async()

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.

◆ create_async_nb()

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.

◆ critical() [1/2]

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

Definition at line 207 of file spdlog.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ critical() [2/2]

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

Definition at line 249 of file spdlog.h.

Here is the call graph for this function:

◆ daily_logger_mt()

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 124 of file daily_file_sink.h.

◆ daily_logger_st()

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 131 of file daily_file_sink.h.

◆ debug() [1/2]

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

Definition at line 183 of file spdlog.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ debug() [2/2]

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

Definition at line 225 of file spdlog.h.

Here is the call graph for this function:

◆ default_logger()

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

Definition at line 149 of file spdlog.h.

Here is the call graph for this function:

◆ default_logger_raw()

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

Definition at line 154 of file spdlog.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drop()

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

Definition at line 111 of file spdlog.h.

Here is the call graph for this function:

◆ drop_all()

void spdlog::drop_all ( )
inline

Definition at line 117 of file spdlog.h.

Here is the call graph for this function:

◆ error() [1/2]

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

Definition at line 201 of file spdlog.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ error() [2/2]

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

Definition at line 243 of file spdlog.h.

Here is the call graph for this function:

◆ flush_every()

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

Definition at line 85 of file spdlog.h.

Here is the call graph for this function:

◆ flush_on()

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

Definition at line 78 of file spdlog.h.

Here is the call graph for this function:

◆ get()

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

Definition at line 53 of file spdlog.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ info() [1/2]

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

Definition at line 189 of file spdlog.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ info() [2/2]

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

Definition at line 231 of file spdlog.h.

Here is the call graph for this function:

◆ init_thread_pool()

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

Definition at line 76 of file async.h.

Here is the call graph for this function:

◆ log() [1/3]

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ log() [2/3]

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.

Here is the call graph for this function:

◆ log() [3/3]

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

Definition at line 213 of file spdlog.h.

Here is the call graph for this function:

◆ null_logger_mt()

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.

◆ null_logger_st()

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.

◆ register_logger()

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

Definition at line 97 of file spdlog.h.

Here is the call graph for this function:

◆ rotating_logger_mt()

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 
)
inline

Definition at line 143 of file rotating_file_sink.h.

◆ rotating_logger_st()

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 
)
inline

Definition at line 150 of file rotating_file_sink.h.

◆ set_automatic_registration()

void spdlog::set_automatic_registration ( bool  automatic_registation)
inline

Definition at line 129 of file spdlog.h.

Here is the call graph for this function:

◆ set_default_logger()

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

Definition at line 159 of file spdlog.h.

Here is the call graph for this function:

◆ set_error_handler()

void spdlog::set_error_handler ( log_err_handler  handler)
inline

Definition at line 91 of file spdlog.h.

Here is the call graph for this function:

◆ set_formatter()

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

Definition at line 59 of file spdlog.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_level()

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

Definition at line 72 of file spdlog.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_pattern()

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shutdown()

void spdlog::shutdown ( )
inline

Definition at line 123 of file spdlog.h.

Here is the call graph for this function:

◆ stderr_color_mt()

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.

◆ stderr_color_st()

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.

◆ stderr_logger_mt()

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.

◆ stderr_logger_st()

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.

◆ stdout_color_mt()

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.

◆ stdout_color_st()

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.

◆ stdout_logger_mt()

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.

◆ stdout_logger_st()

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.

◆ syslog_logger_mt()

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.

◆ syslog_logger_st()

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.

◆ thread_pool()

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

Definition at line 83 of file async.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_hex() [1/2]

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.

Here is the call graph for this function:

◆ to_hex() [2/2]

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.

◆ trace() [1/2]

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

Definition at line 177 of file spdlog.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ trace() [2/2]

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

Definition at line 219 of file spdlog.h.

Here is the call graph for this function:

◆ warn() [1/2]

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

Definition at line 195 of file spdlog.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ warn() [2/2]

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

Definition at line 237 of file spdlog.h.

Here is the call graph for this function: