ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
ngl::logfile_bi Struct Reference

BI日志文件实现 More...

Inheritance diagram for ngl::logfile_bi:
ngl::logfile

Public Member Functions

 logfile_bi (const config &aconfig)
void printf (const np_logitem *alog) final
 将一条格式化的日志项写入目标文件。
Public Member Functions inherited from ngl::logfile
 logfile (const config &aconfig)
 构造函数。
bool flush_count () const
 检查当前文件是否应该轮转。
void close_fstream ()
 关闭当前文件流。
bool create_dir (const std::string &apath)
 确保目标目录存在。
void create ()
 构建目录树并打开新的日志文件。
void flush ()
 显式刷新当前文件流。

Additional Inherited Members

Static Public Member Functions inherited from ngl::logfile
static std::shared_ptr< logfilecreate_make (const config &aconfig)
 根据日志类型创建具体的文件格式化器。
Public Attributes inherited from ngl::logfile
std::ofstream m_stream
 日志文件输出流
config m_config
 不可变的文件配置
int m_count = 0
 写入当前文件的记录数
int m_fcount = 0
 同一天/时间段的文件序号

Detailed Description

BI日志文件实现

输出单行结构化的业务智能日志记录

Member Function Documentation

◆ printf()

void ngl::logfile_bi::printf ( const np_logitem * alog)
finalvirtual

将一条格式化的日志项写入目标文件。

Parameters
alog日志条目指针
Note
纯虚函数,由派生类实现具体的格式化逻辑。

Implements ngl::logfile.


The documentation for this struct was generated from the following file: