wibble::log::Streambuf Class Reference

Streambuf class for logging. More...

#include <stream.h>

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

List of all members.

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.


Detailed Description

Streambuf class for logging.

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

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

override to get data as a std::streambuf

References line, and send().

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::setLevel ( const Level level  ) 

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

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

Set/change the sender to use for this streambuf.

References sender.


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().

Level of the next log message.

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().

Sender used to send log messages.

Referenced by send(), and setSender().


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

Generated on Fri Jun 12 05:23:27 2009 for wibble by  doxygen 1.5.9