Overview

Packages

  • log4php
    • appenders
    • configurators
    • filters
    • helpers
    • layouts
    • pattern
    • renderers

Classes

  • Logger
  • LoggerAppender
  • LoggerAppenderPool
  • LoggerAutoloader
  • LoggerConfigurable
  • LoggerConfiguratorDefault
  • LoggerFilter
  • LoggerHierarchy
  • LoggerLayout
  • LoggerLevel
  • LoggerLocationInfo
  • LoggerLoggingEvent
  • LoggerMDC
  • LoggerNDC
  • LoggerReflectionUtils
  • LoggerRoot
  • LoggerThrowableInformation

Interfaces

  • LoggerConfigurator

Exceptions

  • LoggerException
  • Overview
  • Package
  • Class
  • Tree

Class LoggerConfiguratorDefault

Default implementation of the logger configurator.

Configures log4php based on a provided configuration file or array.

LoggerConfiguratorDefault implements LoggerConfigurator
Package: log4php
License: Apache License, Version 2.0
Version: $Revision: 1394956 $
Since: 2.2
Located at configurators/LoggerConfiguratorDefault.php
Methods summary
public
# configure( LoggerHierarchy $hierarchy, string|array $input = null )

Configures log4php based on the given configuration. The input can either be a path to the config file, or a PHP array holding the configuration.

Configures log4php based on the given configuration. The input can either be a path to the config file, or a PHP array holding the configuration.

If no configuration is given, or if the given configuration cannot be parsed for whatever reason, a warning will be issued, and log4php will use the default configuration contained in $defaultConfiguration.

Parameters

$hierarchy
LoggerHierarchy
$hierarchy The hierarchy on which to perform the configuration.
$input
string|array
$input Either path to the config file or the configuration as an array. If not set, default configuration will be used.

Implementation of

LoggerConfigurator::configure()
public array
# parse( string|array $input )

Parses the given configuration and returns the parsed configuration as a PHP array. Does not perform any configuration.

Parses the given configuration and returns the parsed configuration as a PHP array. Does not perform any configuration.

If no configuration is given, or if the given configuration cannot be parsed for whatever reason, a warning will be issued, and the default configuration will be returned ($defaultConfiguration).

Parameters

$input
string|array
$input Either path to the config file or the configuration as an array. If not set, default configuration will be used.

Returns

array
The parsed configuration.
public static array
# getDefaultConfiguration( )

Returns the default log4php configuration.

Returns the default log4php configuration.

Returns

array
Constants summary
string FORMAT_XML 'xml'
#

XML configuration file format.

XML configuration file format.

string FORMAT_PHP 'php'
#

PHP configuration file format.

PHP configuration file format.

string FORMAT_INI 'ini'
#

INI (properties) configuration file format.

INI (properties) configuration file format.

Apache log4php API documentation generated by ApiGen 2.8.0