InspIRCd  2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations
Public Member Functions | Protected Attributes | List of all members
FileWriter Class Reference

#include <logger.h>

Public Member Functions

 FileWriter (FILE *logfile)
void WriteLogLine (const std::string &line)
virtual ~FileWriter ()

Protected Attributes

FILE * log
int writeops

Detailed Description

Simple wrapper providing periodic flushing to a disk-backed file.

Constructor & Destructor Documentation

FileWriter::FileWriter ( FILE *  logfile)

The constructor takes an already opened logfile.

FileWriter::~FileWriter ( )

Close the log file and cancel any events.

Member Function Documentation

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.

Member Data Documentation

FILE* FileWriter::log

The log file (fd is inside this somewhere, we get it out with fileno())

int FileWriter::writeops

Number of write operations that have occured

The documentation for this class was generated from the following files: