trigger_error("log4php: Given configurator object [$configurator] does not implement the LoggerConfigurator interface. Reverting to default configurator.",E_USER_WARNING);
returnnewLoggerConfiguratorDefault();
}
}
if(is_string($configurator)){
if(!class_exists($configurator)){
trigger_error("log4php: Specified configurator class [$configurator] does not exist. Reverting to default configurator.",E_USER_WARNING);
returnnewLoggerConfiguratorDefault();
}
$instance=new$configurator();
if(!($instanceinstanceofLoggerConfigurator)){
trigger_error("log4php: Specified configurator class [$configurator] does not implement the LoggerConfigurator interface. Reverting to default configurator.",E_USER_WARNING);
returnnewLoggerConfiguratorDefault();
}
return$instance;
}
trigger_error("log4php: Invalid configurator specified. Expected either a string or a LoggerConfigurator instance. Reverting to default configurator.",E_USER_WARNING);
returnnewLoggerConfiguratorDefault();
}
/**
* Returns true if the log4php framework has been initialized.
* 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.
*
* @package log4php
*/
if(function_exists('__autoload')){
trigger_error("log4php: It looks like your code is using an __autoload() function. log4php uses spl_autoload_register() which will bypass your __autoload() function and may break autoloading.",E_USER_WARNING);