Class LoggerConfiguratorDefault
Default implementation of the logger configurator.
Configures log4php based on a provided configuration file or array.
-
LoggerConfiguratorDefault
implements
LoggerConfigurator
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
|
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.
|