Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
spdlog Namespace Reference

Namespaces

namespace  details
 
namespace  level
 
namespace  sinks
 

Classes

class  formatter
 
class  logger
 
class  spdlog_ex
 
class  SPDLOG_FINAL
 

Typedefs

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 formatter_ptr = std::shared_ptr<spdlog::formatter>
 
using level_t = std::atomic<int>
 
using log_err_handler = std::function<void(const std::string &err_msg)>
 
using filename_t = std::string
 

Enumerations

enum class  async_overflow_policy { block_retry , discard_log_msg }
 
enum class  pattern_time_type { local , utc }
 

Functions

std::shared_ptr< loggerget (const std::string &name)
 
void set_pattern (const std::string &format_string)
 
void set_formatter (formatter_ptr f)
 
void set_level (level::level_enum log_level)
 
void set_error_handler (log_err_handler)
 
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 set_sync_mode ()
 
std::shared_ptr< loggerbasic_logger_mt (const std::string &logger_name, const filename_t &filename, bool truncate=false)
 
std::shared_ptr< loggerbasic_logger_st (const std::string &logger_name, const filename_t &filename, bool truncate=false)
 
std::shared_ptr< loggerrotating_logger_mt (const std::string &logger_name, const filename_t &filename, size_t max_file_size, size_t max_files)
 
std::shared_ptr< loggerrotating_logger_st (const std::string &logger_name, const filename_t &filename, size_t max_file_size, size_t max_files)
 
std::shared_ptr< loggerdaily_logger_mt (const std::string &logger_name, const filename_t &filename, int hour=0, int minute=0)
 
std::shared_ptr< loggerdaily_logger_st (const std::string &logger_name, const filename_t &filename, int hour=0, int minute=0)
 
std::shared_ptr< loggerstdout_logger_mt (const std::string &logger_name)
 
std::shared_ptr< loggerstdout_logger_st (const std::string &logger_name)
 
std::shared_ptr< loggerstderr_logger_mt (const std::string &logger_name)
 
std::shared_ptr< loggerstderr_logger_st (const std::string &logger_name)
 
std::shared_ptr< loggerstdout_color_mt (const std::string &logger_name)
 
std::shared_ptr< loggerstdout_color_st (const std::string &logger_name)
 
std::shared_ptr< loggerstderr_color_mt (const std::string &logger_name)
 
std::shared_ptr< loggerstderr_color_st (const std::string &logger_name)
 
std::shared_ptr< loggercreate (const std::string &logger_name, const sink_ptr &sink)
 
std::shared_ptr< loggercreate (const std::string &logger_name, sinks_init_list sinks)
 
template<class It >
std::shared_ptr< loggercreate (const std::string &logger_name, const It &sinks_begin, const It &sinks_end)
 
template<typename Sink , typename... Args>
std::shared_ptr< spdlog::loggercreate (const std::string &logger_name, Args...)
 
std::shared_ptr< loggercreate_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)
 
std::shared_ptr< loggercreate_async (const std::string &logger_name, sinks_init_list sinks, 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)
 
template<class It >
std::shared_ptr< loggercreate_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)
 
void register_logger (std::shared_ptr< logger > logger)
 
void apply_all (std::function< void(std::shared_ptr< logger >)> fun)
 
void drop (const std::string &name)
 
void drop_all ()
 

Typedef Documentation

◆ filename_t

using spdlog::filename_t = std::string

Definition at line 157 of file common.h.

◆ formatter_ptr

using spdlog::formatter_ptr = std::shared_ptr<spdlog::formatter>

Definition at line 62 of file common.h.

◆ level_t

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

Definition at line 66 of file common.h.

◆ log_clock

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

Definition at line 59 of file common.h.

◆ log_err_handler

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

Definition at line 69 of file common.h.

◆ sink_ptr

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

Definition at line 60 of file common.h.

◆ sinks_init_list

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

Definition at line 61 of file common.h.

Enumeration Type Documentation

◆ async_overflow_policy

enum class spdlog::async_overflow_policy
strong
Enumerator
block_retry 
discard_log_msg 

Definition at line 107 of file common.h.

◆ pattern_time_type

enum class spdlog::pattern_time_type
strong
Enumerator
local 
utc 

Definition at line 117 of file common.h.

Function Documentation

◆ apply_all()

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

Definition at line 255 of file spdlog_impl.h.

◆ basic_logger_mt()

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

Definition at line 51 of file spdlog_impl.h.

◆ basic_logger_st()

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

Definition at line 56 of file spdlog_impl.h.

◆ create() [1/4]

template<typename Sink , typename... Args>
std::shared_ptr< spdlog::logger > spdlog::create ( const std::string & logger_name,
Args... args )
inline

Definition at line 193 of file spdlog_impl.h.

◆ create() [2/4]

template<class It >
std::shared_ptr< logger > spdlog::create ( const std::string & logger_name,
const It & sinks_begin,
const It & sinks_end )

◆ create() [3/4]

std::shared_ptr< spdlog::logger > spdlog::create ( const std::string & logger_name,
const sink_ptr & sink )
inline

Definition at line 179 of file spdlog_impl.h.

◆ create() [4/4]

std::shared_ptr< spdlog::logger > spdlog::create ( const std::string & logger_name,
spdlog::sinks_init_list sinks )
inline

Definition at line 186 of file spdlog_impl.h.

◆ create_async() [1/3]

template<class It >
std::shared_ptr< logger > spdlog::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 )

◆ create_async() [2/3]

std::shared_ptr< spdlog::logger > spdlog::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 )
inline

Definition at line 207 of file spdlog_impl.h.

◆ create_async() [3/3]

std::shared_ptr< spdlog::logger > spdlog::create_async ( const std::string & logger_name,
sinks_init_list sinks,
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 )
inline

Definition at line 213 of file spdlog_impl.h.

◆ daily_logger_mt()

std::shared_ptr< spdlog::logger > spdlog::daily_logger_mt ( const std::string & logger_name,
const filename_t & filename,
int hour = 0,
int minute = 0 )
inline

Definition at line 73 of file spdlog_impl.h.

◆ daily_logger_st()

std::shared_ptr< spdlog::logger > spdlog::daily_logger_st ( const std::string & logger_name,
const filename_t & filename,
int hour = 0,
int minute = 0 )
inline

Definition at line 78 of file spdlog_impl.h.

◆ drop()

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

Definition at line 45 of file spdlog_impl.h.

◆ drop_all()

void spdlog::drop_all ( )
inline

Definition at line 260 of file spdlog_impl.h.

+ Here is the call graph for this function:

◆ get()

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

Definition at line 40 of file spdlog_impl.h.

◆ register_logger()

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

Definition at line 35 of file spdlog_impl.h.

◆ rotating_logger_mt()

std::shared_ptr< spdlog::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 62 of file spdlog_impl.h.

◆ rotating_logger_st()

std::shared_ptr< spdlog::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 67 of file spdlog_impl.h.

◆ set_async_mode()

void spdlog::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 )
inline

Definition at line 245 of file spdlog_impl.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 239 of file spdlog_impl.h.

+ Here is the call graph for this function:

◆ set_formatter()

void spdlog::set_formatter ( spdlog::formatter_ptr f)
inline

Definition at line 224 of file spdlog_impl.h.

+ Here is the call graph for this function:

◆ set_level()

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

Definition at line 234 of file spdlog_impl.h.

+ Here is the call graph for this function:

◆ set_pattern()

void spdlog::set_pattern ( const std::string & format_string)
inline

Definition at line 229 of file spdlog_impl.h.

◆ set_sync_mode()

void spdlog::set_sync_mode ( )
inline

Definition at line 250 of file spdlog_impl.h.

+ Here is the call graph for this function:

◆ stderr_color_mt()

std::shared_ptr< spdlog::logger > spdlog::stderr_color_mt ( const std::string & logger_name)
inline

Definition at line 150 of file spdlog_impl.h.

◆ stderr_color_st()

std::shared_ptr< spdlog::logger > spdlog::stderr_color_st ( const std::string & logger_name)
inline

Definition at line 156 of file spdlog_impl.h.

◆ stderr_logger_mt()

std::shared_ptr< spdlog::logger > spdlog::stderr_logger_mt ( const std::string & logger_name)
inline

Definition at line 97 of file spdlog_impl.h.

◆ stderr_logger_st()

std::shared_ptr< spdlog::logger > spdlog::stderr_logger_st ( const std::string & logger_name)
inline

Definition at line 102 of file spdlog_impl.h.

◆ stdout_color_mt()

std::shared_ptr< spdlog::logger > spdlog::stdout_color_mt ( const std::string & logger_name)
inline

Definition at line 138 of file spdlog_impl.h.

◆ stdout_color_st()

std::shared_ptr< spdlog::logger > spdlog::stdout_color_st ( const std::string & logger_name)
inline

Definition at line 144 of file spdlog_impl.h.

◆ stdout_logger_mt()

std::shared_ptr< spdlog::logger > spdlog::stdout_logger_mt ( const std::string & logger_name)
inline

Definition at line 87 of file spdlog_impl.h.

◆ stdout_logger_st()

std::shared_ptr< spdlog::logger > spdlog::stdout_logger_st ( const std::string & logger_name)
inline

Definition at line 92 of file spdlog_impl.h.