ConfiguratorDefault
ConfiguratorDefault implements LoggerConfigurator
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
All Implemented Interfaces:
- LoggerConfigurator
Constant summary
Methods summary
Modifier and Type | Method |
---|---|
public | configure ( LoggerHierarchy hierarchy , string|array input = null ) |
public array | parse ( string|array input ) |
public static array | getDefaultConfiguration ( ) |
Constants in detail
-
FORMAT_XML
const FORMAT_XML
-
FORMAT_PHP
const FORMAT_PHP
-
FORMAT_INI
const FORMAT_INI
Methods in detail
-
configure
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.param
LoggerHierarchy The hierarchy on which to perform the configuration.string|array input Either path to the config file or the configuration as an array. If not set, default configuration will be used. -
parse
array public parse ( string|array input )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).param
string|array input Either path to the config file or the configuration as an array. If not set, default configuration will be used.return
array -
getDefaultConfiguration
array public static getDefaultConfiguration ( )Returns the default log4php configuration.return
array