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

LogStream Class Reference

LogStream base class. More...

#include <logger.h>

Inheritance diagram for LogStream:

Inheritance graph
[legend]
Collaboration diagram for LogStream:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LogStream (InspIRCd *Instance, int loglevel)
virtual ~LogStream ()
void ChangeLevel (int lvl)
 Changes the loglevel for this LogStream on-the-fly.
virtual void OnLog (int loglevel, const std::string &type, const std::string &msg)=0
 Called when there is stuff to log for this particular logstream.

Protected Attributes

InspIRCdServerInstance
int loglvl

Detailed Description

LogStream base class.

Modules (and other stuff) inherit from this to decide what logging they are interested in, and what to do with it.

Definition at line 97 of file logger.h.


Constructor & Destructor Documentation

LogStream::LogStream InspIRCd Instance,
int  loglevel
[inline]
 

Definition at line 103 of file logger.h.

virtual LogStream::~LogStream  )  [inline, virtual]
 

Definition at line 110 of file logger.h.


Member Function Documentation

void LogStream::ChangeLevel int  lvl  )  [inline]
 

Changes the loglevel for this LogStream on-the-fly.

This is needed for -nofork. But other LogStreams could use it to change loglevels.

Definition at line 115 of file logger.h.

Referenced by LogManager::SetupNoFork().

virtual void LogStream::OnLog int  loglevel,
const std::string type,
const std::string msg
[pure 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.

Implemented in FileLogStream.


Member Data Documentation

int LogStream::loglvl [protected]
 

Definition at line 101 of file logger.h.

Referenced by FileLogStream::OnLog().

InspIRCd* LogStream::ServerInstance [protected]
 

Definition at line 100 of file logger.h.

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


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