|
ZCLibLog
|
异步日志器 更多...
#include <logger_async.hpp>


Public 类型 | |
| using | Self = LoggerAsync |
| using | Tag = LogTag<typename Formatter::Format_API, Self> |
Public 类型 继承自 ZCLibLog::BaseLogger< Formatter > | |
| using | m_formatter = Formatter |
Public 成员函数 | |
| void | execute (std::string &message, const LogLevel level) const |
| 调用执行器处理日志信息和等级 | |
Public 成员函数 继承自 ZCLibLog::BaseLogger< Formatter > | |
| ZCLibLog_NODISCARD const std::string & | name () const noexcept |
| 获取日志器的名字 | |
| ZCLibLog_NODISCARD LogLevelCfg & | config () noexcept |
| 获取并可修改日志器的等级配置 | |
| ZCLibLog_NODISCARD bool | be_executable (const LogLevel level) const noexcept |
| 检查等级是否可执行 | |
| ZCLibLog_NODISCARD bool | has_executor () const |
| 判断是否有执行器 | |
| size_t | bind_executor (const executor &ex) |
| 绑定执行器 | |
| void | debind_executor (size_t id) |
| 解绑执行器 | |
| void | clear_executors () |
| 清空所有执行器 | |
| BaseLogger (std::string name, const std::initializer_list< executor > &executor_ptrs={}, const LogLevelCfg config={}) | |
| 构造同步日志器 | |
Public 属性 | |
| Tag | ALL {this, LogLevel::ALL} |
| ALL级别Tag | |
| Tag | TRACE {this, LogLevel::TRACE} |
| TRACE级别Tag | |
| Tag | DEBUG {this, LogLevel::DEBUG} |
| DEBUG级别Tag | |
| Tag | INFO {this, LogLevel::INFO} |
| INFO级别Tag | |
| Tag | WARN {this, LogLevel::WARN} |
| WARN级别Tag | |
| Tag | ERROR {this, LogLevel::ERROR} |
| ERROR级别Tag | |
| Tag | FATAL {this, LogLevel::FATAL} |
| FATAL级别Tag | |
额外继承的成员函数 | |
Protected 类型 继承自 ZCLibLog::BaseLogger< Formatter > | |
| using | executor_pair = std::pair<size_t, executor> |
Protected 属性 继承自 ZCLibLog::BaseLogger< Formatter > | |
| std::string | m_name |
| std::vector< executor_pair > | m_executors |
| size_t | m_nextID {} |
| LogLevelCfg | m_config |
异步日志器
| Formatter | 绑定的格式化器 |
| using ZCLibLog::LoggerAsync< Formatter >::Self = LoggerAsync |
| using ZCLibLog::LoggerAsync< Formatter >::Tag = LogTag<typename Formatter::Format_API, Self> |
|
inline |
调用执行器处理日志信息和等级
| message | 日志信息 |
| level | 日志等级 |
| Tag ZCLibLog::LoggerAsync< Formatter >::ALL {this, LogLevel::ALL} |
ALL级别Tag
| Tag ZCLibLog::LoggerAsync< Formatter >::DEBUG {this, LogLevel::DEBUG} |
DEBUG级别Tag
| Tag ZCLibLog::LoggerAsync< Formatter >::ERROR {this, LogLevel::ERROR} |
ERROR级别Tag
| Tag ZCLibLog::LoggerAsync< Formatter >::FATAL {this, LogLevel::FATAL} |
FATAL级别Tag
| Tag ZCLibLog::LoggerAsync< Formatter >::INFO {this, LogLevel::INFO} |
INFO级别Tag
| Tag ZCLibLog::LoggerAsync< Formatter >::TRACE {this, LogLevel::TRACE} |
TRACE级别Tag
| Tag ZCLibLog::LoggerAsync< Formatter >::WARN {this, LogLevel::WARN} |
WARN级别Tag