#include <logger.h>
|
| LogStream (LogLevel loglevel) |
|
void | ChangeLevel (LogLevel lvl) |
|
virtual void | OnLog (LogLevel loglevel, const std::string &type, const std::string &msg)=0 |
|
virtual CullResult | cull () |
|
|
static const char | LogHeader [] |
|
LogStream base class. Modules (and other stuff) inherit from this to decide what logging they are interested in, and what to do with it.
◆ ChangeLevel()
void LogStream::ChangeLevel |
( |
LogLevel |
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.
◆ OnLog()
virtual void LogStream::OnLog |
( |
LogLevel |
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.
◆ LogHeader
const char LogStream::LogHeader |
|
static |
Initial value:=
"Log started for " INSPIRCD_VERSION
The documentation for this class was generated from the following files: