LogSystem beta 1.4
This is a logging system project
 
载入中...
搜索中...
未找到
Xulog::TimeFormatItem类 参考

时间格式化子项 更多...

#include <format.hpp>

类 Xulog::TimeFormatItem 继承关系图:
Xulog::TimeFormatItem 的协作图:

Public 成员函数

 TimeFormatItem (const std::string &fmt="%H:%M:%S")
 构造时间格式化子项
 
void format (std::ostream &out, LogMsg &msg) override
 格式化时间
 

Private 属性

std::string _time_fmt
 时间格式
 

额外继承的成员函数

- Public 类型 继承自 Xulog::FormatItem
using ptr = std::shared_ptr< FormatItem >
 

详细描述

时间格式化子项

构造及析构函数说明

◆ TimeFormatItem()

Xulog::TimeFormatItem::TimeFormatItem ( const std::string &  fmt = "%H:%M:%S")
inline

构造时间格式化子项

参数
fmt时间格式,默认为"%H:%M:%S"

成员函数说明

◆ format()

void Xulog::TimeFormatItem::format ( std::ostream &  out,
LogMsg msg 
)
inlineoverridevirtual

格式化时间

参数
out输出流
msg日志消息

实现了 Xulog::FormatItem.

类成员变量说明

◆ _time_fmt

std::string Xulog::TimeFormatItem::_time_fmt
private

时间格式