## Class LoggerAppenderConsole

Description

LoggerAppenderConsole appends log events either to the standard output stream (php://stdout) or the standard error stream (php://stderr).

**Note**: Use this Appender with command-line php scripts. On web scripts this appender has no effects.

This appender uses a layout.

## Configurable parameters: ##

- **target** - the target stream: "stdout" or "stderr"

- version: $Revision: 1343601 $
- link: Appender documentation
- license: Apache License, Version 2.0

Located in /log4php/appenders/LoggerAppenderConsole.php (line 38)

    LoggerConfigurable
       |
       --LoggerAppender
          |
          --LoggerAppenderConsole

Class Constant Summary
STDERR = 'php://stderr'
STDOUT = 'php://stdout'
Variable Summary
resource $fp
mixed $target
Method Summary
void activateOptions ()
void append (LoggerLoggingEvent $event)
void close ()
string getTarget ()
void setTarget (string $target)
Variables
resource $fp = null (line 53)

Stream resource for the target stream.

- access: protected

mixed $target = self::STDOUT (line 47)

The 'target' parameter.

- access: protected

#### Inherited Variables

Inherited from LoggerAppender

> LoggerAppender::$closed
> LoggerAppender::$filter
> LoggerAppender::$layout
> LoggerAppender::$name
> LoggerAppender::$requiresLayout
> LoggerAppender::$threshold

Methods
activateOptions (line 55)

- access: public

void activateOptions ()

Redefinition of:

LoggerAppender::activateOptions()
  Prepares the appender for logging.

append (line 74)

- access: public

void append (LoggerLoggingEvent $event)

- LoggerLoggingEvent $event

Redefinition of:

LoggerAppender::append()
  Forwards the logging event to the destination.

close (line 64)

- access: public

void close ()

Redefinition of:

LoggerAppender::close()
  Releases any resources allocated by the appender.

getTarget (line 100)

Returns the value of the 'target' parameter.

- access: public

string getTarget ()
setTarget (line 84)

Sets the 'target' parameter.

- access: public

void setTarget (string $target)

- string $target

#### Inherited Methods

Inherited From LoggerAppender

> LoggerAppender::__construct()
> LoggerAppender::activateOptions()
> LoggerAppender::addFilter()
> LoggerAppender::append()
> LoggerAppender::clearFilters()
> LoggerAppender::close()
> LoggerAppender::doAppend()
> LoggerAppender::getDefaultLayout()
> LoggerAppender::getFilter()
> LoggerAppender::getFirstFilter()
> LoggerAppender::getLayout()
> LoggerAppender::getName()
> LoggerAppender::getThreshold()
> LoggerAppender::isAsSevereAsThreshold()
> LoggerAppender::requiresLayout()
> LoggerAppender::setLayout()
> LoggerAppender::setName()
> LoggerAppender::setThreshold()
> LoggerAppender::warn()
> LoggerAppender::__destruct()

Inherited From LoggerConfigurable

> LoggerConfigurable::setBoolean()
> LoggerConfigurable::setFileSize()
> LoggerConfigurable::setInteger()
> LoggerConfigurable::setLevel()
> LoggerConfigurable::setNumeric()
> LoggerConfigurable::setPositiveInteger()
> LoggerConfigurable::setString()
> LoggerConfigurable::warn()

Class Constants
STDERR = 'php://stderr' (line 44)

The standard error stream.

STDOUT = 'php://stdout' (line 41)

The standard otuput stream.

Documentation generated on Mon, 02 Feb 2026 13:59:49 +0900 by phpDocumentor 1.4.4