InspIRCd  2.0
Public Member Functions | Protected Attributes | List of all members
LogStream Class Referenceabstract

#include <logger.h>

Inheritance diagram for LogStream:
classbase FileLogStream

Public Member Functions

 LogStream (int loglevel)
void ChangeLevel (int lvl)
virtual void OnLog (int loglevel, const std::string &type, const std::string &msg)=0
- Public Member Functions inherited from classbase
virtual CullResult cull ()

Protected Attributes

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.

Member Function Documentation

◆ ChangeLevel()

void LogStream::ChangeLevel ( int  lvl)

Changes the loglevel for this LogStream on-the-fly. This is needed for -nofork. But other LogStreams could use it to change loglevels.

◆ OnLog()

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.

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