/** * @see \Components\Log_Appender::initialize() initialize */ public function initialize() { if (false === $this->m_initialized) { parent::initialize(); \LoggerPropertyConfigurator::configure($this->getConfigurationFile()); $this->m_logger = $this->getLoggerImpl(\str\underscoreToCamelCase(__CLASS__)); $this->level = self::$m_mapNameToLevel[strtolower($this->m_logger->getEffectiveLevel())]; $this->m_initialized = true; } }
* All Rights Reserved. * Contributor(s): ______________________________________.. ********************************************************************************/ // This file should no longer be used in the main product. It is provided for backwards compatibility only. require_once 'config.php'; if (!defined('LOG4PHP_DIR')) { define('LOG4PHP_DIR', 'log4php'); } if (!defined('LOG4PHP_DEFAULT_INIT_OVERRIDE')) { define('LOG4PHP_DEFAULT_INIT_OVERRIDE', true); } require_once LOG4PHP_DIR . '/LoggerManager.php'; require_once LOG4PHP_DIR . '/LoggerPropertyConfigurator.php'; if (!isset($simple_log) || $simple_log == false) { $config = new LoggerPropertyConfigurator(); $config->configure('log4php.properties'); } class SimpleLog { var $fp; var $logfile = 'sugarcrm.log'; var $loglevel = 5; var $nolog = false; function SimpleLog() { global $loglevel, $logfile; if (!empty($loglevel)) { if ($loglevel == 'fatal') { $this->loglevel = 5; } else { if ($loglevel == 'error') {
/********************************************************************************* * The contents of this file are subject to the SugarCRM Public License Version 1.1.2 * ("License"); You may not use this file except in compliance with the * License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific language governing rights and limitations under the License. * The Original Code is: SugarCRM Open Source * The Initial Developer of the Original Code is SugarCRM, Inc. * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.; * All Rights Reserved. * Contributor(s): ______________________________________. ********************************************************************************/ /********************************************************************************* * $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/include/logging.php,v 1.1 2004/08/17 13:23:37 gjayakrishnan Exp $ * Description: Kicks off log4php. ********************************************************************************/ require_once 'config.php'; global $site_instance_dir; global $is_instances; define('LOG4PHP_DIR', 'log4php'); define('LOG4PHP_DEFAULT_INIT_OVERRIDE', true); require_once LOG4PHP_DIR . '/LoggerManager.php'; require_once LOG4PHP_DIR . '/LoggerPropertyConfigurator.php'; $config = new LoggerPropertyConfigurator(); if ($is_instances) { $config->configure($site_instance_dir . '/log4php.properties'); } else { $config->configure('log4php.properties'); }