# Class LoggerAppenderConsole

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"

  LoggerConfigurable
  LoggerAppender
  LoggerAppenderConsole

Package: log4php\appenders
License: Apache License, Version 2.0
Version: $Revision: 1343601 $
Link: Appender documentation
Located at appenders/LoggerAppenderConsole.php

Methods summary
`public` | # `activateOptions( )` Prepares the appender for logging. Prepares the appender for logging. Derived appenders should override this method if option structure requires it.

#### Overrides

`LoggerAppender::activateOptions()`
`public` | # `close( )` Releases any resources allocated by the appender. Releases any resources allocated by the appender. Derived appenders should override this method to perform proper closing procedures.

#### Overrides

`LoggerAppender::close()`
`public` | # `append( `LoggerLoggingEvent` $event )` Forwards the logging event to the destination. Forwards the logging event to the destination. Derived appenders should implement this method to perform actual logging.

#### Parameters

$event
  ``LoggerLoggingEvent``
  $event

`public` | # `setTarget( string $target )` Sets the 'target' parameter. Sets the 'target' parameter.

#### Parameters

$target
  `string`
  $target

`public string` | # `getTarget( )` Returns the value of the 'target' parameter. Returns the value of the 'target' parameter.

#### Returns

`string`

Methods inherited from LoggerAppender
`__construct(), __destruct(), addFilter(), clearFilters(), doAppend(), getDefaultLayout(), getFilter(), getFirstFilter(), getLayout(), getName(), getThreshold(), isAsSevereAsThreshold(), requiresLayout(), setLayout(), setName(), setThreshold(), warn()`

Methods inherited from LoggerConfigurable
`setBoolean(), setFileSize(), setInteger(), setLevel(), setNumeric(), setPositiveInteger(), setString()`

Constants summary
`string` | `STDOUT` | `'php://stdout'` | # The standard otuput stream. The standard otuput stream.
`string` | `STDERR` | `'php://stderr'` | # The standard error stream. The standard error stream.

Properties summary
`protected string` | $target | ``LoggerAppenderConsole::STDOUT`` | # The 'target' parameter. The 'target' parameter.
`protected resource` | $fp | `null` | # Stream resource for the target stream. Stream resource for the target stream.

Properties inherited from LoggerAppender
`$closed, $filter, $layout, $name, $requiresLayout, $threshold`