# log4cplus::ConsoleAppender Class Reference

ConsoleAppender appends log events to `System.out` or `System.err` using a layout specified by the user. More...

`#include <consoleappender.h>`

Inheritance diagram for log4cplus::ConsoleAppender:

[legend]
Collaboration diagram for log4cplus::ConsoleAppender:

[legend]
List of all members.

## 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.

## Protected Member Functions

virtual void | append (const spi::InternalLoggingEvent &event)

## Protected Attributes

bool | logToStdErr
bool | immediateFlush
| Immediate flush means that the underlying output stream will be flushed at the end of each append operation.

## Detailed Description

ConsoleAppender appends log events to `System.out` or `System.err` using a layout specified by the user.

The default target is `System.out`.

Definition at line 28 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]`

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.

## 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 49 of file consoleappender.h.

bool log4cplus::ConsoleAppender::logToStdErr`[protected]`

| Definition at line 44 of file consoleappender.h.

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

- consoleappender.h