The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

FileLogStream Class Reference

A logging class which logs to a streamed file. More...

#include <filelogger.h>

Inheritance diagram for FileLogStream:

Inheritance graph
[legend]
Collaboration diagram for FileLogStream:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FileLogStream (InspIRCd *Instance, int loglevel, FileWriter *fw)
virtual ~FileLogStream ()
virtual void OnLog (int loglevel, const std::string &type, const std::string &msg)
 Called when there is stuff to log for this particular logstream.

Private Attributes

FileWriterf

Detailed Description

A logging class which logs to a streamed file.

Definition at line 36 of file filelogger.h.


Constructor & Destructor Documentation

FileLogStream::FileLogStream InspIRCd Instance,
int  loglevel,
FileWriter fw
 

Definition at line 22 of file filelogger.cpp.

References LogManager::AddLoggerRef(), f, InspIRCd::Logs, and LogStream::ServerInstance.

FileLogStream::~FileLogStream  )  [virtual]
 

Definition at line 28 of file filelogger.cpp.

References LogManager::DelLoggerRef(), f, InspIRCd::Logs, and LogStream::ServerInstance.


Member Function Documentation

void FileLogStream::OnLog int  loglevel,
const std::string type,
const std::string msg
[virtual]
 

Called when there is stuff to log for this particular logstream.

The derived class may take no action with it, or do what it wants with the output, basically. loglevel and type are primarily for informational purposes (the level and type of the event triggered) and msg is, of course, the actual message to log.

Implements LogStream.

Definition at line 34 of file filelogger.cpp.

References InspIRCd::Config, f, ServerConfig::forcedebug, LogStream::loglvl, LogStream::ServerInstance, strlcpy(), InspIRCd::Time(), and FileWriter::WriteLogLine().


Member Data Documentation

FileWriter* FileLogStream::f [private]
 

Definition at line 39 of file filelogger.h.

Referenced by FileLogStream(), OnLog(), and ~FileLogStream().


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