InspIRCd
2.0
|
#include <logger.h>
Public Member Functions | |
FileWriter (FILE *logfile) | |
void | WriteLogLine (const std::string &line) |
virtual | ~FileWriter () |
Protected Attributes | |
FILE * | log |
int | writeops |
Simple wrapper providing periodic flushing to a disk-backed file.
FileWriter::FileWriter | ( | FILE * | logfile | ) |
The constructor takes an already opened logfile.
|
virtual |
Close the log file and cancel any events.
void FileWriter::WriteLogLine | ( | const std::string & | line | ) |
Write one or more preformatted log lines. If the data cannot be written immediately, this class will insert itself into the SocketEngine, and register a write event, and when the write event occurs it will attempt again to write the data.
|
protected |
The log file (fd is inside this somewhere, we get it out with fileno())
|
protected |
Number of write operations that have occured