RMVL  2.5.0-dev
Robotic Manipulation and Vision Library
载入中...
搜索中...
未找到
rm::sink_write_t结构体 参考

日志后端写入定制点 更多...

#include <rmvl/logger.hpp>

rm::sink_write_t 的协作图:

Public 成员函数

template<typename SinkType>
bool operator() (SinkType &sink, LogLevel level, std::string_view record) const noexcept(noexcept(sink_write_invoke(sink, level, record)))
 将一条日志记录写入指定后端

详细描述

日志后端写入定制点

自定义日志后端需要通过 ADL 提供返回 bool 的 sink_write_invoke(SinkType &, LogLevel, std::string_view) 重载,即自定义的 sink_write_invoke 需要定义在和 SinkType 相同的命名空间中。

成员函数说明

◆ operator()()

template<typename SinkType>
bool rm::sink_write_t::operator() ( SinkType & sink,
LogLevel level,
std::string_view record ) const
inlinenoexcept

将一条日志记录写入指定后端

模板参数
SinkType日志后端类型
参数
[in,out]sink日志后端
[in]level日志级别
[in]record已格式化的完整日志记录
返回
是否写入成功