log4cplus_ConsoleAppender(3)

log4cplus::ConsoleAppender(3) log4cplus log4cplus::ConsoleAppender(3)

NAME

log4cplus::ConsoleAppender - ConsoleAppender appends log events to std::cout or std::cerr using a layout specified by the user.

SYNOPSIS

#include <consoleappender.h>

Inherits log4cplus::Appender.

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 const log4cplus::thread::Mutex & 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.

Additional Inherited Members

Detailed Description

ConsoleAppender appends log events to std::cout or std::cerr using a layout specified by the user.

The default target is std::cout.

Properties

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.

See also

Appender

Definition at line 54 of file consoleappender.h.

Constructor & Destructor Documentation

log4cplus::ConsoleAppender::ConsoleAppender (bool logToStdErr = false, bool immediateFlush = false)

log4cplus::ConsoleAppender::ConsoleAppender (const log4cplus::helpers::Properties & properties)

log4cplus::ConsoleAppender::~ConsoleAppender ()

Member Function Documentation

virtual void log4cplus::ConsoleAppender::append (const spi::InternalLoggingEvent & event) [protected], [virtual]

Subclasses of Appender should implement this method to perform actual logging.

See also

doAppend method.

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 const log4cplus::thread::Mutex& log4cplus::ConsoleAppender::getOutputMutex () [static]

This mutex is used by ConsoleAppender and helpers::LogLog classes to synchronize output to console.

Member Data Documentation

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.

Author

Generated automatically by Doxygen for log4cplus from the source code.

Fri Jun 18 2021 Version 2.0.6