log4cplus
2.0.0
|
ConsoleAppender appends log events to std::cout
or std::cerr
using a layout specified by the user.
More...
#include <consoleappender.h>
Public Member Functions | |
ConsoleAppender (bool logToStdErr=false, bool immediateFlush=false) | |
ConsoleAppender (const log4cplus::helpers::Properties &properties) | |
~ConsoleAppender () | |
virtual void | close () |
Release any resources allocated within the appender such as file handles, network connections, etc. | |
Static Public Member Functions | |
static log4cplus::thread::Mutex const & | getOutputMutex () |
This mutex is used by ConsoleAppender and helpers::LogLog classes to synchronize output to console. | |
Protected Member Functions | |
virtual void | append (const spi::InternalLoggingEvent &event) |
Subclasses of Appender should implement this method to perform actual logging. | |
Protected Attributes | |
bool | logToStdErr |
bool | immediateFlush |
Immediate flush means that the underlying output stream will be flushed at the end of each append operation. |
ConsoleAppender appends log events to std::cout
or std::cerr
using a layout specified by the user.
The default target is std::cout
.
logToStdErr
When it is set true, the output stream will be std::cerr
instead of std::cout
.
ImmediateFlush
When it is set true, output stream will be flushed after each appended event.
Definition at line 54 of file consoleappender.h.
log4cplus::ConsoleAppender::ConsoleAppender | ( | bool | logToStdErr = false , |
bool | immediateFlush = false |
||
) |
log4cplus::ConsoleAppender::ConsoleAppender | ( | const log4cplus::helpers::Properties & | properties | ) |
virtual void log4cplus::ConsoleAppender::append | ( | const spi::InternalLoggingEvent & | event | ) | [protected, virtual] |
Subclasses of Appender
should implement this method to perform actual logging.
Implements log4cplus::Appender.
virtual void log4cplus::ConsoleAppender::close | ( | ) | [virtual] |
Release any resources allocated within the appender such as file handles, network connections, etc.
It is a programming error to append to a closed appender.
Implements log4cplus::Appender.
static log4cplus::thread::Mutex const& log4cplus::ConsoleAppender::getOutputMutex | ( | ) | [static] |
This mutex is used by ConsoleAppender and helpers::LogLog classes to synchronize output to console.
bool log4cplus::ConsoleAppender::immediateFlush [protected] |
Immediate flush means that the underlying output stream will be flushed at the end of each append operation.
Definition at line 79 of file consoleappender.h.
bool log4cplus::ConsoleAppender::logToStdErr [protected] |
Definition at line 74 of file consoleappender.h.