本文整理汇总了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;
}
示例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);
//.........这里部分代码省略.........
示例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);
}
}
示例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';