文件日志落地实现 更多...
#include <sink.hpp>
Public 成员函数 | |
FileSink (const std::string &pathname) | |
构造函数 | |
void | log (const char *data, size_t len) |
日志写入到文件 | |
![]() | |
LogSink () | |
virtual | ~LogSink () |
Private 属性 | |
std::string | _pathname |
文件路径 | |
std::ofstream | _ofs |
文件输出流 | |
额外继承的成员函数 | |
![]() | |
using | ptr = std::shared_ptr< LogSink > |
智能指针类型 | |
文件日志落地实现
该类实现了将日志写入到指定文件的功能。
|
inline |
构造函数
pathname | 文件路径 |
创建并打开指定的日志文件。
|
inlinevirtual |
|
private |
文件输出流
|
private |
文件路径