wibble 1.1
|
Streambuf class for logging. More...
#include <stream.h>
Public Member Functions | |
Streambuf () | |
Construct a nonworking Streambuf to be initialised later. | |
Streambuf (Sender *s) | |
virtual | ~Streambuf () |
void | send_partial_line () |
If there is a partial line, send it out. | |
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. | |
Sender * | sender |
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. | |
Streambuf class for logging.
wibble::log::Streambuf::Streambuf | ( | ) |
Construct a nonworking Streambuf to be initialised later.
wibble::log::Streambuf::Streambuf | ( | Sender * | s | ) |
s | The sender to use to send log messages. Streambuf will just use the pointer, but will not take over memory maintenance |
|
virtual |
References send_partial_line().
|
protected |
Send the message "line" with the level "level".
References defaultLevel, level, line, wibble::log::Sender::send(), and sender.
Referenced by overflow(), and send_partial_line().
void wibble::log::Streambuf::send_partial_line | ( | ) |
Set the level for the next message, and the next message only.
References level.
Set/change the sender to use for this streambuf.
References sender.
Level to use for messages whose level has not been specified.
Referenced by send().
|
protected |
Level of the next log message.
Referenced by send(), and setLevel().
|
protected |
Line buffer with the log message we are building.
Referenced by overflow(), send(), and send_partial_line().
|
protected |
Sender used to send log messages.
Referenced by send(), and setSender().