#include <registry.h>
Public Member Functions | |
registry (const registry &)=delete | |
registry & | operator= (const registry &)=delete |
void | register_logger (std::shared_ptr< logger > new_logger) |
void | initialize_logger (std::shared_ptr< logger > new_logger) |
std::shared_ptr< logger > | get (const std::string &logger_name) |
std::shared_ptr< logger > | default_logger () |
logger * | get_default_raw () |
void | set_default_logger (std::shared_ptr< logger > new_default_logger) |
void | set_tp (std::shared_ptr< thread_pool > tp) |
std::shared_ptr< thread_pool > | get_tp () |
void | set_formatter (std::unique_ptr< formatter > formatter) |
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 | apply_all (const std::function< void(const std::shared_ptr< logger >)> &fun) |
void | flush_all () |
void | drop (const std::string &logger_name) |
void | drop_all () |
void | shutdown () |
std::recursive_mutex & | tp_mutex () |
void | set_automatic_registration (bool automatic_regsistration) |
Static Public Member Functions | |
static registry & | instance () |
Private Member Functions | |
registry () | |
~registry ()=default | |
void | throw_if_exists_ (const std::string &logger_name) |
void | register_logger_ (std::shared_ptr< logger > new_logger) |
Private Attributes | |
std::mutex | logger_map_mutex_ |
std::mutex | flusher_mutex_ |
std::recursive_mutex | tp_mutex_ |
std::unordered_map< std::string, std::shared_ptr< logger > > | loggers_ |
std::unique_ptr< formatter > | formatter_ |
level::level_enum | level_ = spdlog::logger::default_level() |
level::level_enum | flush_level_ = level::off |
log_err_handler | err_handler_ |
std::shared_ptr< thread_pool > | tp_ |
std::unique_ptr< periodic_worker > | periodic_flusher_ |
std::shared_ptr< logger > | default_logger_ |
bool | automatic_registration_ = true |
Definition at line 36 of file registry.h.
|
delete |
|
inlineprivate |
Definition at line 235 of file registry.h.
|
privatedefault |
|
inline |
Definition at line 166 of file registry.h.
|
inline |
Definition at line 74 of file registry.h.
|
inline |
Definition at line 184 of file registry.h.
|
inline |
Definition at line 194 of file registry.h.
|
inline |
Definition at line 175 of file registry.h.
|
inline |
Definition at line 149 of file registry.h.
|
inline |
Definition at line 139 of file registry.h.
|
inline |
Definition at line 67 of file registry.h.
|
inline |
Definition at line 84 of file registry.h.
|
inline |
Definition at line 112 of file registry.h.
|
inline |
Definition at line 48 of file registry.h.
|
inlinestatic |
Definition at line 228 of file registry.h.
|
inline |
Definition at line 42 of file registry.h.
|
inlineprivate |
Definition at line 264 of file registry.h.
|
inline |
Definition at line 222 of file registry.h.
|
inline |
Definition at line 91 of file registry.h.
|
inline |
Definition at line 156 of file registry.h.
|
inline |
Definition at line 119 of file registry.h.
|
inline |
Definition at line 129 of file registry.h.
|
inline |
Definition at line 106 of file registry.h.
|
inline |
Definition at line 202 of file registry.h.
|
inlineprivate |
Definition at line 256 of file registry.h.
|
inline |
Definition at line 217 of file registry.h.
|
private |
Definition at line 281 of file registry.h.
|
private |
Definition at line 280 of file registry.h.
|
private |
Definition at line 277 of file registry.h.
|
private |
Definition at line 276 of file registry.h.
|
private |
Definition at line 271 of file registry.h.
|
private |
Definition at line 274 of file registry.h.
|
private |
Definition at line 275 of file registry.h.
|
private |
Definition at line 271 of file registry.h.
|
private |
Definition at line 273 of file registry.h.
|
private |
Definition at line 279 of file registry.h.
|
private |
Definition at line 278 of file registry.h.
|
private |
Definition at line 272 of file registry.h.