当前位置: 首页>>代码示例>>PHP>>正文


PHP LoggerLog::internalDebugging方法代码示例

本文整理汇总了PHP中LoggerLog::internalDebugging方法的典型用法代码示例。如果您正苦于以下问题:PHP LoggerLog::internalDebugging方法的具体用法?PHP LoggerLog::internalDebugging怎么用?PHP LoggerLog::internalDebugging使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LoggerLog的用法示例。


在下文中一共展示了LoggerLog::internalDebugging方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: doConfigureProperties

 /**
  * Read configuration options from <b>properties</b>.
  *
  * @see doConfigure().
  * @param array $properties
  * @param LoggerHierarchy &$hierarchy
  */
 function doConfigureProperties($properties, &$hierarchy)
 {
     $value = @$properties[LOG4PHP_LOGGER_PROPERTY_CONFIGURATOR_LOGGER_DEBUG_KEY];
     if (!empty($value)) {
         LoggerLog::internalDebugging(LoggerOptionConverter::toBoolean($value, LoggerLog::internalDebugging()));
     }
     $thresholdStr = @$properties[LOG4PHP_LOGGER_PROPERTY_CONFIGURATOR_THRESHOLD_PREFIX];
     $hierarchy->setThreshold(LoggerOptionConverter::toLevel($thresholdStr, LoggerLevel::getLevelAll()));
     $this->configureRootCategory($properties, $hierarchy);
     $this->configureLoggerFactory($properties);
     $this->parseCatsAndRenderers($properties, $hierarchy);
     LoggerLog::debug("LoggerPropertyConfigurator::doConfigureProperties() Finished configuring.");
     return true;
 }
开发者ID:ruckfull,项目名称:taobaocrm,代码行数:21,代码来源:LoggerPropertyConfigurator.php

示例2: tagOpen

 /**
  * @param mixed $parser
  * @param string $tag
  * @param array $attribs
  *
  * @todo In 'LOGGER' case find a better way to detect 'getLogger()' method
  */
 function tagOpen($parser, $tag, $attribs)
 {
     switch ($tag) {
         case 'CONFIGURATION':
         case LOG4PHP_LOGGER_DOM_CONFIGURATOR_XMLNS . ':CONFIGURATION':
             LoggerLog::debug("LoggerDOMConfigurator::tagOpen() CONFIGURATION");
             if (isset($attribs['THRESHOLD'])) {
                 $this->repository->setThreshold(LoggerOptionConverter::toLevel($this->subst($attribs['THRESHOLD']), $this->repository->getThreshold()));
             }
             if (isset($attribs['DEBUG'])) {
                 $debug = LoggerOptionConverter::toBoolean($this->subst($attribs['DEBUG']), LoggerLog::internalDebugging());
                 $this->repository->debug = $debug;
                 LoggerLog::internalDebugging($debug);
                 LoggerLog::debug("LoggerDOMConfigurator::tagOpen() LOG4PHP:CONFIGURATION. Internal Debug turned " . ($debug ? 'on' : 'off'));
             }
             break;
         case 'APPENDER':
         case LOG4PHP_LOGGER_DOM_CONFIGURATOR_XMLNS . ':APPENDER':
             unset($this->appender);
             $this->appender = null;
             $name = $this->subst(@$attribs['NAME']);
             $class = $this->subst(@$attribs['CLASS']);
             LoggerLog::debug("LoggerDOMConfigurator::tagOpen():tag=[{$tag}]:name=[{$name}]:class=[{$class}]");
             $this->appender =& LoggerAppender::singleton($name, $class);
             if ($this->appender === null) {
                 LoggerLog::warn("LoggerDOMConfigurator::tagOpen() APPENDER cannot instantiate appender '{$name}'");
             }
             $this->state[] = LOG4PHP_LOGGER_DOM_CONFIGURATOR_APPENDER_STATE;
             break;
         case 'APPENDER_REF':
         case 'APPENDER-REF':
         case LOG4PHP_LOGGER_DOM_CONFIGURATOR_XMLNS . ':APPENDER_REF':
         case LOG4PHP_LOGGER_DOM_CONFIGURATOR_XMLNS . ':APPENDER-REF':
             if (isset($attribs['REF']) and !empty($attribs['REF'])) {
                 $appenderName = $this->subst($attribs['REF']);
                 LoggerLog::debug("LoggerDOMConfigurator::tagOpen() APPENDER-REF ref='{$appenderName}'");
                 $appender =& LoggerAppender::singleton($appenderName);
                 if ($appender !== null) {
                     switch (end($this->state)) {
                         case LOG4PHP_LOGGER_DOM_CONFIGURATOR_LOGGER_STATE:
                         case LOG4PHP_LOGGER_DOM_CONFIGURATOR_ROOT_STATE:
                             $this->logger->addAppender($appender);
                             break;
                     }
                 } else {
                     LoggerLog::warn("LoggerDOMConfigurator::tagOpen() APPENDER-REF ref '{$appenderName}' points to a null appender");
                 }
             } else {
                 LoggerLog::warn("LoggerDOMConfigurator::tagOpen() APPENDER-REF ref not set or empty");
             }
             break;
         case 'FILTER':
         case LOG4PHP_LOGGER_DOM_CONFIGURATOR_XMLNS . ':FILTER':
             LoggerLog::debug("LoggerDOMConfigurator::tagOpen() FILTER");
             unset($this->filter);
             $this->filter = null;
             $filterName = basename($this->subst(@$attribs['CLASS']));
             if (!empty($filterName)) {
                 if (!class_exists($filterName)) {
                     @(include_once LOG4PHP_DIR . "/varia/{$filterName}.php");
                 }
                 if (class_exists($filterName)) {
                     $this->filter = new $filterName();
                 } else {
                     LoggerLog::warn("LoggerDOMConfigurator::tagOpen() FILTER. class '{$filterName}' doesnt exist");
                 }
                 $this->state[] = LOG4PHP_LOGGER_DOM_CONFIGURATOR_FILTER_STATE;
             } else {
                 LoggerLog::warn("LoggerDOMConfigurator::tagOpen() FILTER filter name cannot be empty");
             }
             break;
         case 'LAYOUT':
         case LOG4PHP_LOGGER_DOM_CONFIGURATOR_XMLNS . ':LAYOUT':
             $class = @$attribs['CLASS'];
             LoggerLog::debug("LoggerDOMConfigurator::tagOpen() LAYOUT class='{$class}'");
             $this->layout = LoggerLayout::factory($this->subst($class));
             if ($this->layout === null) {
                 LoggerLog::warn("LoggerDOMConfigurator::tagOpen() LAYOUT unable to instanciate class='{$class}'");
             }
             $this->state[] = LOG4PHP_LOGGER_DOM_CONFIGURATOR_LAYOUT_STATE;
             break;
         case 'LOGGER':
         case LOG4PHP_LOGGER_DOM_CONFIGURATOR_XMLNS . ':LOGGER':
             // $this->logger is assigned by reference.
             // Only '$this->logger=null;' destroys referenced object
             unset($this->logger);
             $this->logger = null;
             $loggerName = $this->subst(@$attribs['NAME']);
             if (!empty($loggerName)) {
                 LoggerLog::debug("LoggerDOMConfigurator::tagOpen() LOGGER. name='{$loggerName}'");
                 $class = $this->subst(@$attribs['CLASS']);
                 if (empty($class)) {
                     $this->logger =& $this->repository->getLogger($loggerName);
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:101,代码来源:LoggerDOMConfigurator.php

示例3: log

 /**
  * Log if debug is enabled.
  *
  * Log using php {@link PHP_MANUAL#trigger_error trigger_error()} function 
  * with E_USER_NOTICE level by default.
  *
  * @param string $message log message
  * @param integer $errLevel level to log
  * @static
  */
 public static function log($message, $errLevel = E_USER_NOTICE)
 {
     if (LoggerLog::internalDebugging()) {
         trigger_error($message, $errLevel);
     }
 }
开发者ID:rrsc,项目名称:freemed,代码行数:16,代码来源:LoggerLog.php

示例4: join

                }
                $message["trace"][] = join(":", $item);
            }
        }
    }
    $logger =& LoggerManager::getLogger("error");
    if (in_array($errno, $notices)) {
        //$firephp->info($message,$errortype[$errno]);
        $logger->debug($message);
    } else {
        if (in_array($errno, $warnings)) {
            $logger->warn($message);
            //$firephp->warn($message,$errortype[$errno]);
        } else {
            $logger->fatal($message);
            //        $firephp->error($message,$errortype[$errno]);
            $firephp->trace("fatal error stack trace");
            if (!$debug) {
                //header("Content-Type: plain/text; charset=UTF-8");
                echo "<pre>";
                echo "Es ist ein schwerwiegender Fehler im Skript aufgetreten, bitte wenden Sie sich an den Entwickler!";
                echo "</pre>";
            }
            die;
        }
    }
}
$old_error_handler = set_error_handler("userErrorHandler");
require_once LOG4PHP_DIR . '/LoggerLog.php';
LoggerLog::internalDebugging($debug_logger);
require_once LOG4PHP_DIR . '/LoggerManager.php';
开发者ID:Bobsel,项目名称:gn-tic,代码行数:31,代码来源:logging.php


注:本文中的LoggerLog::internalDebugging方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。