#include <CategoryStream.hh>
Public Types | |
ENDLINE | |
enum | Separator { ENDLINE } |
Enumeration of special 'Separators'. More... | |
Public Member Functions | |
CategoryStream (Category &category, Priority::Value priority) | |
Construct a CategoryStream for given Category with given priority. | |
~CategoryStream () | |
Destructor for CategoryStream. | |
Category & | getCategory () const |
Returns the destination Category for this stream. | |
Priority::Value | getPriority () const throw () |
Returns the priority for this stream. | |
CategoryStream & | operator<< (Separator separator) |
Streams in a Separator. | |
void | flush () |
Flush the contents of the stream buffer to the Category and empties the buffer. | |
template<typename T> | |
CategoryStream & | operator<< (const T &t) |
Stream in arbitrary types and objects. |
Use category.errorStream(), etc. to obtain a CategoryStream class.
log4cpp::CategoryStream::CategoryStream | ( | Category & | category, | |
Priority::Value | priority | |||
) |
Construct a CategoryStream for given Category with given priority.
category | The category this stream will send log messages to. | |
priority | The priority the log messages will get or Priority::NOTSET to silently discard any streamed in messages. |
log4cpp::CategoryStream::~CategoryStream | ( | ) |
Destructor for CategoryStream.
void log4cpp::CategoryStream::flush | ( | ) |
Flush the contents of the stream buffer to the Category and empties the buffer.
Category& log4cpp::CategoryStream::getCategory | ( | ) | const [inline] |
Priority::Value log4cpp::CategoryStream::getPriority | ( | ) | const throw () [inline] |
Returns the priority for this stream.
CategoryStream& log4cpp::CategoryStream::operator<< | ( | const T & | t | ) | [inline] |
Stream in arbitrary types and objects.
t | The value or object to stream in. |
CategoryStream & log4cpp::CategoryStream::operator<< | ( | Separator | separator | ) |
Streams in a Separator.
If the separator equals CategoryStream::ENDLINE it sends the contents of the stream buffer to the Category with set priority and empties the buffer.
separator | The Separator |