Ark Server API (ASE) - Wiki
|
#include <registry.h>
Public Member Functions | |
void | register_logger (std::shared_ptr< logger > logger) |
std::shared_ptr< logger > | get (const std::string &logger_name) |
template<class It > | |
std::shared_ptr< logger > | create (const std::string &logger_name, const It &sinks_begin, const It &sinks_end) |
template<class It > | |
std::shared_ptr< async_logger > | create_async (const std::string &logger_name, size_t queue_size, const async_overflow_policy overflow_policy, const std::function< void()> &worker_warmup_cb, const std::chrono::milliseconds &flush_interval_ms, const std::function< void()> &worker_teardown_cb, const It &sinks_begin, const It &sinks_end) |
void | apply_all (std::function< void(std::shared_ptr< logger >)> fun) |
void | drop (const std::string &logger_name) |
void | drop_all () |
std::shared_ptr< logger > | create (const std::string &logger_name, sinks_init_list sinks) |
std::shared_ptr< logger > | create (const std::string &logger_name, sink_ptr sink) |
std::shared_ptr< async_logger > | create_async (const std::string &logger_name, size_t queue_size, const async_overflow_policy overflow_policy, const std::function< void()> &worker_warmup_cb, const std::chrono::milliseconds &flush_interval_ms, const std::function< void()> &worker_teardown_cb, sinks_init_list sinks) |
std::shared_ptr< async_logger > | create_async (const std::string &logger_name, size_t queue_size, const async_overflow_policy overflow_policy, const std::function< void()> &worker_warmup_cb, const std::chrono::milliseconds &flush_interval_ms, const std::function< void()> &worker_teardown_cb, sink_ptr sink) |
void | formatter (formatter_ptr f) |
void | set_pattern (const std::string &pattern) |
void | set_level (level::level_enum log_level) |
void | set_error_handler (log_err_handler handler) |
void | set_async_mode (size_t q_size, const async_overflow_policy overflow_policy, const std::function< void()> &worker_warmup_cb, const std::chrono::milliseconds &flush_interval_ms, const std::function< void()> &worker_teardown_cb) |
void | set_sync_mode () |
Static Public Member Functions | |
static registry_t< Mutex > & | instance () |
Private Member Functions | |
registry_t () | |
registry_t (const registry_t< Mutex > &)=delete | |
registry_t< Mutex > & | operator= (const registry_t< Mutex > &)=delete |
void | throw_if_exists (const std::string &logger_name) |
Private Attributes | |
Mutex | _mutex |
std::unordered_map< std::string, std::shared_ptr< logger > > | _loggers |
formatter_ptr | _formatter |
level::level_enum | _level = level::info |
log_err_handler | _err_handler |
bool | _async_mode = false |
size_t | _async_q_size = 0 |
async_overflow_policy | _overflow_policy = async_overflow_policy::block_retry |
std::function< void()> | _worker_warmup_cb = nullptr |
std::chrono::milliseconds | _flush_interval_ms |
std::function< void()> | _worker_teardown_cb = nullptr |
Definition at line 29 of file registry.h.
|
inlineprivate |
Definition at line 180 of file registry.h.
|
privatedelete |
|
inline |
Definition at line 94 of file registry.h.
|
inline |
Definition at line 50 of file registry.h.
|
inline |
Definition at line 117 of file registry.h.
|
inline |
Definition at line 112 of file registry.h.
|
inline |
Definition at line 75 of file registry.h.
|
inline |
Definition at line 127 of file registry.h.
|
inline |
Definition at line 122 of file registry.h.
|
inline |
Definition at line 101 of file registry.h.
|
inline |
|
inline |
|
inline |
Definition at line 42 of file registry.h.
|
inlinestatic |
|
privatedelete |
|
inline |
Definition at line 33 of file registry.h.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 140 of file registry.h.
|
inline |
|
inlineprivate |
Definition at line 191 of file registry.h.
|
private |
Definition at line 201 of file registry.h.
|
private |
Definition at line 202 of file registry.h.
|
private |
Definition at line 200 of file registry.h.
|
private |
Definition at line 205 of file registry.h.
|
private |
Definition at line 198 of file registry.h.
|
private |
Definition at line 199 of file registry.h.
|
private |
Definition at line 197 of file registry.h.
|
private |
Definition at line 196 of file registry.h.
|
private |
Definition at line 203 of file registry.h.
|
private |
Definition at line 206 of file registry.h.
|
private |
Definition at line 204 of file registry.h.