wibble::log::Streambuf Class Reference

#include <stream.h>

Collaboration diagram for wibble::log::Streambuf:
[legend]

List of all members.


Detailed Description

Streambuf class for logging.

Public Member Functions

 Streambuf ()
 Construct a nonworking Streambuf to be initialised later.
 Streambuf (Sender *s)
virtual ~Streambuf ()
void setSender (Sender *s)
 Set/change the sender to use for this streambuf.
void setLevel (const Level &level)
 Set the level for the next message, and the next message only.
int overflow (int c)
 override to get data as a std::streambuf

Protected Member Functions

void send ()
 Send the message "line" with the level "level".

Protected Attributes

std::string line
 Line buffer with the log message we are building.
Level level
 Level of the next log message.
Sendersender
 Sender used to send log messages.

Static Protected Attributes

static const Level defaultLevel = INFO
 Level to use for messages whose level has not been specified.

Constructor & Destructor Documentation

wibble::log::Streambuf::Streambuf (  ) 

Construct a nonworking Streambuf to be initialised later.

wibble::log::Streambuf::Streambuf ( Sender s  ) 

Parameters:
s The sender to use to send log messages. Streambuf will just use the pointer, but will not take over memory maintenance

wibble::log::Streambuf::~Streambuf (  )  [virtual]

References line, and send().


Member Function Documentation

void wibble::log::Streambuf::send (  )  [protected]

Send the message "line" with the level "level".

References defaultLevel, level, line, wibble::log::Sender::send(), and sender.

Referenced by overflow(), and ~Streambuf().

void wibble::log::Streambuf::setSender ( Sender s  ) 

Set/change the sender to use for this streambuf.

References sender.

void wibble::log::Streambuf::setLevel ( const Level level  ) 

Set the level for the next message, and the next message only.

int wibble::log::Streambuf::overflow ( int  c  ) 

override to get data as a std::streambuf

References line, and send().


Member Data Documentation

const Level wibble::log::Streambuf::defaultLevel = INFO [static, protected]

Level to use for messages whose level has not been specified.

Referenced by send().

std::string wibble::log::Streambuf::line [protected]

Line buffer with the log message we are building.

Referenced by overflow(), send(), and ~Streambuf().

Level of the next log message.

Referenced by send().

Sender used to send log messages.

Referenced by send(), and setSender().


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

Generated on Tue Jun 17 22:23:55 2008 for wibble by  doxygen 1.5.6