Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
spdlog::logger Class Reference

#include <logger.h>

+ Inheritance diagram for spdlog::logger:

Public Member Functions

 logger (const std::string &logger_name, sink_ptr single_sink)
 
 logger (const std::string &name, sinks_init_list)
 
template<class It >
 logger (const std::string &name, const It &begin, const It &end)
 
virtual ~logger ()
 
 logger (const logger &)=delete
 
loggeroperator= (const logger &)=delete
 
template<typename... Args>
void log (level::level_enum lvl, const char *fmt, const Args &... args)
 
template<typename... Args>
void log (level::level_enum lvl, const char *msg)
 
template<typename Arg1 , typename... Args>
void trace (const char *fmt, const Arg1 &, const Args &... args)
 
template<typename Arg1 , typename... Args>
void debug (const char *fmt, const Arg1 &, const Args &... args)
 
template<typename Arg1 , typename... Args>
void info (const char *fmt, const Arg1 &, const Args &... args)
 
template<typename Arg1 , typename... Args>
void warn (const char *fmt, const Arg1 &, const Args &... args)
 
template<typename Arg1 , typename... Args>
void error (const char *fmt, const Arg1 &, const Args &... args)
 
template<typename Arg1 , typename... Args>
void critical (const char *fmt, const Arg1 &, const Args &... args)
 
template<typename T >
void log (level::level_enum lvl, const T &)
 
template<typename T >
void trace (const T &)
 
template<typename T >
void debug (const T &)
 
template<typename T >
void info (const T &)
 
template<typename T >
void warn (const T &)
 
template<typename T >
void error (const T &)
 
template<typename T >
void critical (const T &)
 
bool should_log (level::level_enum) const
 
void set_level (level::level_enum)
 
level::level_enum level () const
 
const std::string & name () const
 
void set_pattern (const std::string &, pattern_time_type=pattern_time_type::local)
 
void set_formatter (formatter_ptr)
 
void flush_on (level::level_enum log_level)
 
virtual void flush ()
 
const std::vector< sink_ptr > & sinks () const
 
virtual void set_error_handler (log_err_handler)
 
virtual log_err_handler error_handler ()
 

Protected Member Functions

virtual void _sink_it (details::log_msg &)
 
virtual void _set_pattern (const std::string &, pattern_time_type)
 
virtual void _set_formatter (formatter_ptr)
 
virtual void _default_err_handler (const std::string &msg)
 
bool _should_flush_on (const details::log_msg &)
 
void _incr_msg_counter (details::log_msg &msg)
 

Protected Attributes

const std::string _name
 
std::vector< sink_ptr_sinks
 
formatter_ptr _formatter
 
spdlog::level_t _level
 
spdlog::level_t _flush_level
 
log_err_handler _err_handler
 
std::atomic< time_t > _last_err_time
 
std::atomic< size_t > _msg_counter
 

Detailed Description

Definition at line 25 of file logger.h.

Constructor & Destructor Documentation

◆ logger() [1/4]

spdlog::logger::logger ( const std::string & logger_name,
spdlog::sink_ptr single_sink )
inline

Definition at line 39 of file logger_impl.h.

◆ logger() [2/4]

spdlog::logger::logger ( const std::string & name,
sinks_init_list sinks_list )
inline

Definition at line 33 of file logger_impl.h.

◆ logger() [3/4]

template<class It >
spdlog::logger::logger ( const std::string & name,
const It & begin,
const It & end )
inline

Definition at line 17 of file logger_impl.h.

◆ ~logger()

spdlog::logger::~logger ( )
inlinevirtualdefault

◆ logger() [4/4]

spdlog::logger::logger ( const logger & )
delete

Member Function Documentation

◆ _default_err_handler()

void spdlog::logger::_default_err_handler ( const std::string & msg)
inlineprotectedvirtual

Definition at line 344 of file logger_impl.h.

◆ _incr_msg_counter()

void spdlog::logger::_incr_msg_counter ( details::log_msg & msg)
inlineprotected

Definition at line 364 of file logger_impl.h.

◆ _set_formatter()

void spdlog::logger::_set_formatter ( formatter_ptr msg_formatter)
inlineprotectedvirtual

Reimplemented in spdlog::SPDLOG_FINAL.

Definition at line 333 of file logger_impl.h.

+ Here is the caller graph for this function:

◆ _set_pattern()

void spdlog::logger::_set_pattern ( const std::string & pattern,
pattern_time_type pattern_time )
inlineprotectedvirtual

Reimplemented in spdlog::SPDLOG_FINAL.

Definition at line 329 of file logger_impl.h.

◆ _should_flush_on()

bool spdlog::logger::_should_flush_on ( const details::log_msg & msg)
inlineprotected

Definition at line 358 of file logger_impl.h.

+ Here is the caller graph for this function:

◆ _sink_it()

void spdlog::logger::_sink_it ( details::log_msg & msg)
inlineprotectedvirtual

Reimplemented in spdlog::SPDLOG_FINAL.

Definition at line 311 of file logger_impl.h.

+ Here is the call graph for this function:

◆ critical() [1/2]

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

Definition at line 161 of file logger_impl.h.

◆ critical() [2/2]

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

Definition at line 200 of file logger_impl.h.

◆ debug() [1/2]

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

Definition at line 137 of file logger_impl.h.

◆ debug() [2/2]

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

Definition at line 174 of file logger_impl.h.

◆ error() [1/2]

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

Definition at line 155 of file logger_impl.h.

+ Here is the caller graph for this function:

◆ error() [2/2]

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

Definition at line 194 of file logger_impl.h.

+ Here is the caller graph for this function:

◆ error_handler()

spdlog::log_err_handler spdlog::logger::error_handler ( )
inlinevirtual

Reimplemented in spdlog::SPDLOG_FINAL.

Definition at line 287 of file logger_impl.h.

◆ flush()

void spdlog::logger::flush ( )
inlinevirtual

Reimplemented in spdlog::SPDLOG_FINAL.

Definition at line 338 of file logger_impl.h.

+ Here is the caller graph for this function:

◆ flush_on()

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

Definition at line 293 of file logger_impl.h.

◆ info() [1/2]

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

Definition at line 143 of file logger_impl.h.

◆ info() [2/2]

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

Definition at line 181 of file logger_impl.h.

+ Here is the caller graph for this function:

◆ level()

spdlog::level::level_enum spdlog::logger::level ( ) const
inline

Definition at line 298 of file logger_impl.h.

◆ log() [1/3]

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

Definition at line 61 of file logger_impl.h.

◆ log() [2/3]

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

Definition at line 88 of file logger_impl.h.

◆ log() [3/3]

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

Definition at line 109 of file logger_impl.h.

◆ name()

const std::string & spdlog::logger::name ( ) const
inline

Definition at line 272 of file logger_impl.h.

◆ operator=()

logger & spdlog::logger::operator= ( const logger & )
delete

◆ set_error_handler()

void spdlog::logger::set_error_handler ( spdlog::log_err_handler err_handler)
inlinevirtual

Reimplemented in spdlog::SPDLOG_FINAL.

Definition at line 282 of file logger_impl.h.

◆ set_formatter()

void spdlog::logger::set_formatter ( spdlog::formatter_ptr msg_formatter)
inline

Definition at line 50 of file logger_impl.h.

+ Here is the call graph for this function:

◆ set_level()

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

Definition at line 277 of file logger_impl.h.

◆ set_pattern()

void spdlog::logger::set_pattern ( const std::string & pattern,
pattern_time_type pattern_time = pattern_time_type::local )
inline

Definition at line 55 of file logger_impl.h.

◆ should_log()

bool spdlog::logger::should_log ( level::level_enum msg_level) const
inline

Definition at line 303 of file logger_impl.h.

◆ sinks()

const std::vector< spdlog::sink_ptr > & spdlog::logger::sinks ( ) const
inline

Definition at line 369 of file logger_impl.h.

◆ trace() [1/2]

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

Definition at line 131 of file logger_impl.h.

◆ trace() [2/2]

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

Definition at line 168 of file logger_impl.h.

◆ warn() [1/2]

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

Definition at line 149 of file logger_impl.h.

+ Here is the caller graph for this function:

◆ warn() [2/2]

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

Definition at line 188 of file logger_impl.h.

Member Data Documentation

◆ _err_handler

log_err_handler spdlog::logger::_err_handler
protected

Definition at line 104 of file logger.h.

◆ _flush_level

spdlog::level_t spdlog::logger::_flush_level
protected

Definition at line 103 of file logger.h.

◆ _formatter

formatter_ptr spdlog::logger::_formatter
protected

Definition at line 101 of file logger.h.

◆ _last_err_time

std::atomic<time_t> spdlog::logger::_last_err_time
protected

Definition at line 105 of file logger.h.

◆ _level

spdlog::level_t spdlog::logger::_level
protected

Definition at line 102 of file logger.h.

◆ _msg_counter

std::atomic<size_t> spdlog::logger::_msg_counter
protected

Definition at line 106 of file logger.h.

◆ _name

const std::string spdlog::logger::_name
protected

Definition at line 99 of file logger.h.

◆ _sinks

std::vector<sink_ptr> spdlog::logger::_sinks
protected

Definition at line 100 of file logger.h.


The documentation for this class was generated from the following files: