Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

LogSink Class Reference

#include <logstream.h>

Inheritance diagram for LogSink:

Inheritance graph
[legend]
List of all members.

Detailed Description

Base class for different log targets A log sink is attached to a log source and given a certain loglevel threshold. Whenever messages are sent to the log source by the program or the engine, the log source forwards it to all the attached log sinks that are listening for that loglevel threshold. The engine provides a number of sinks by default, the stdout sink (LogStdoutSink), the file sink (LogFileSink) and the console sink (Console). For an example, look at the documentation for the logstream.h file.

Author:
Cody Russell (cody jhu edu)


Public Member Functions

 LogSink ()
virtual ~LogSink ()
void SetLogThreshold (unsigned int uiLevel)
virtual void Write (const std::string &rstrMsg)=0

Protected Attributes

unsigned int m_uiThreshold


Constructor & Destructor Documentation

LogSink  ) 
 

virtual ~LogSink  )  [virtual]
 


Member Function Documentation

void SetLogThreshold unsigned int  uiLevel  ) 
 

Set the threshold of loglevel

Parameters:
uiLevel The new loglevel threshold

virtual void Write const std::string &  rstrMsg  )  [pure virtual]
 

Log sinks implement this to write data

Parameters:
rstrMsg Data to be written

Implemented in Console, LogStdoutSink, LogFileSink, and LogMSVCDebugSink.


Member Data Documentation

unsigned int m_uiThreshold [protected]
 

Loglevel threshold


The documentation for this class was generated from the following file:
Generated on Wed Jan 21 14:21:11 2004 for NeoEngine by doxygen 1.3.5