|
ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
|
默认日志文件实现 More...
Public Member Functions | |
| logfile_default (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< logfile > | create_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 |
| 同一天/时间段的文件序号 | |
默认日志文件实现
输出多行格式化的日志记录,按行数轮转
|
finalvirtual |