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


PHP LoggerLog::debug方法代码示例

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


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

示例1: internalDebugging

 public static function internalDebugging($value = null)
 {
     if (is_bool($value)) {
         self::$debug = $value;
     }
     return self::$debug;
 }
开发者ID:rrsc,项目名称:freemed,代码行数:7,代码来源:LoggerLog.php

示例2: append

 function append($event)
 {
     LoggerLog::debug("LoggerAppenderEcho::append()");
     if ($this->layout !== null) {
         if ($this->firstAppend) {
             echo $this->layout->getHeader();
             $this->firstAppend = false;
         }
         echo $this->layout->format($event);
     }
 }
开发者ID:ruckfull,项目名称:taobaocrm,代码行数:11,代码来源:LoggerAppenderEcho.php

示例3: close

 public function close()
 {
     $from = $this->from;
     $to = $this->to;
     if (!empty($this->body) and $from !== null and $to !== null and $this->layout !== null) {
         $subject = $this->subject;
         LoggerLog::debug("LoggerAppenderMail::close() sending mail from=[{$from}] to=[{$to}] subject=[{$subject}]");
         mail($to, $subject, $this->layout->getHeader() . $this->body . $this->layout->getFooter(), "From: {$from}\r\n");
     }
     $this->closed = true;
 }
开发者ID:rrsc,项目名称:freemed,代码行数:11,代码来源:LoggerAppenderMail.php

示例4: setTarget

 /**
  * Set console target.
  * @param mixed $value a constant or a string
  */
 public function setTarget($value)
 {
     $v = trim($value);
     if ($v == self::STDOUT || strtoupper($v) == 'STDOUT') {
         $this->target = self::STDOUT;
     } elseif ($v == self::STDERR || strtoupper($v) == 'STDERR') {
         $target = self::STDERR;
     } else {
         LoggerLog::debug("Invalid target. Using '" . self::STDOUT . "' by default.");
     }
 }
开发者ID:5haman,项目名称:knowledgetree,代码行数:15,代码来源:LoggerAppenderConsole.php

示例5: close

 function close()
 {
     $from = $this->getFrom();
     $to = $this->getTo();
     if (!empty($this->body) && $from !== null && $to !== null && $this->layout !== null) {
         $subject = $this->getSubject();
         LoggerLog::debug("LoggerAppenderMail::close() sending mail from=[{$from}] to=[{$to}] subject=[{$subject}]");
         @mail($to, $subject, $this->layout->getHeader() . $this->body . $this->layout->getFooter(), "From: {$from}\r\n");
     }
     $this->closed = true;
 }
开发者ID:yozhi,项目名称:YetiForceCRM,代码行数:11,代码来源:LoggerAppenderMail.php

示例6: addRenderer

 /**
  * Add a renderer to a hierarchy passed as parameter.
  * Note that hierarchy must implement getRendererMap() and setRenderer() methods.
  *
  * @param LoggerHierarchy $repository a logger repository.
  * @param string $renderedClassName
  * @param string $renderingClassName
  * @static
  */
 public static function addRenderer($repository, $renderedClassName, $renderingClassName)
 {
     LoggerLog::debug("LoggerRendererMap::addRenderer() Rendering class: [{$renderingClassName}], Rendered class: [{$renderedClassName}].");
     $renderer = LoggerObjectRenderer::factory($renderingClassName);
     if ($renderer == null) {
         LoggerLog::warn("LoggerRendererMap::addRenderer() Could not instantiate renderer [{$renderingClassName}].");
         return;
     } else {
         $repository->setRenderer($renderedClassName, $renderer);
     }
 }
开发者ID:rrsc,项目名称:freemed,代码行数:20,代码来源:LoggerRendererMap.php

示例7: append

 function append($event)
 {
     LoggerLog::debug("LoggerAppenderFirePHP::append()");
     $message = array("message" => $event->getMessage());
     if (function_exists('debug_backtrace')) {
         $prevHop = null;
         $trace = debug_backtrace();
         // make a downsearch to identify the caller
         $hop = array_pop($trace);
         $step = array();
         while ($hop !== null) {
             $className = @$hop['class'];
             if (!empty($className) and ($className == 'loggercategory' or in_array("LoggerCategory", $this->get_ancestors($className)))) {
                 $step["file"] = str_replace("\\", "/", str_replace(getcwd(), "", $hop["file"]));
                 $step["line"] = $hop['line'];
                 break;
             }
             $prevHop = $hop;
             $hop = array_pop($trace);
         }
         $step['class'] = isset($prevHop['class']) ? $prevHop['class'] : 'main';
         if (isset($prevHop['function']) and $prevHop['function'] !== 'include' and $prevHop['function'] !== 'include_once' and $prevHop['function'] !== 'require' and $prevHop['function'] !== 'require_once') {
             $step['function'] = $prevHop['function'];
         } else {
             $step['function'] = 'main';
         }
         $message["caller"] = join(":", array($step["file"], $step["class"], $step["function"], $step["line"]));
     }
     $label = "";
     if (isset($message["caller"])) {
         $label = " " . $message["caller"];
     }
     $level =& $event->getLevel();
     switch ($level->level) {
         case LOG4PHP_LEVEL_INFO_INT:
             $code = FirePHP::INFO;
             break;
         case LOG4PHP_LEVEL_WARN_INT:
             $code = FirePHP::WARN;
             break;
         case LOG4PHP_LEVEL_ERROR_INT:
             $code = FirePHP::ERROR;
             break;
         case LOG4PHP_LEVEL_FATAL_INT:
             $code = FirePHP::ERROR;
             break;
         default:
             $code = FirePHP::LOG;
             break;
     }
     $this->firephp->fb($message, $level->levelStr . $label, $code);
 }
开发者ID:Bobsel,项目名称:gn-tic,代码行数:52,代码来源:LoggerAppenderFirePHP.php

示例8: append

 public function append($event)
 {
     if ($this->layout !== null) {
         LoggerLog::debug("LoggerAppenderPhp::append()");
         $level = $event->getLevel();
         if ($level->isGreaterOrEqual(LoggerLevel::getLevelError())) {
             trigger_error($this->layout->format($event), E_USER_ERROR);
         } elseif ($level->isGreaterOrEqual(LoggerLevel::getLevelWarn())) {
             trigger_error($this->layout->format($event), E_USER_WARNING);
         } else {
             trigger_error($this->layout->format($event), E_USER_NOTICE);
         }
     }
 }
开发者ID:5haman,项目名称:knowledgetree,代码行数:14,代码来源:LoggerAppenderPhp.php

示例9: substVars

 /**
  * Perform variable substitution in string <var>$val</var> from the
  * values of keys found with the {@link getSystemProperty()} method.
  * 
  * <p>The variable substitution delimeters are <b>${</b> and <b>}</b>.
  * 
  * <p>For example, if the "MY_CONSTANT" contains "value", then
  * the call
  * <code>
  * $s = LoggerOptionConverter::substituteVars("Value of key is ${MY_CONSTANT}.");
  * </code>
  * will set the variable <i>$s</i> to "Value of key is value.".</p>
  * 
  * <p>If no value could be found for the specified key, then the
  * <var>$props</var> parameter is searched, if the value could not
  * be found there, then substitution defaults to the empty string.</p>
  * 
  * <p>For example, if {@link getSystemProperty()} cannot find any value for the key
  * "inexistentKey", then the call
  * <code>
  * $s = LoggerOptionConverter::substVars("Value of inexistentKey is [${inexistentKey}]");
  * </code>
  * will set <var>$s</var> to "Value of inexistentKey is []".</p>
  * 
  * <p>A warn is thrown if <var>$val</var> contains a start delimeter "${" 
  * which is not balanced by a stop delimeter "}" and an empty string is returned.</p>
  * 
  * @log4j-author Avy Sharell
  * 
  * @param string $val The string on which variable substitution is performed.
  * @param array $props
  * @return string
  *
  * @static
  */
 function substVars($val, $props = null)
 {
     LoggerLog::debug("LoggerOptionConverter::substVars():val=[{$val}]");
     $sbuf = '';
     $i = 0;
     while (true) {
         $j = strpos($val, LOG4PHP_OPTION_CONVERTER_DELIM_START, $i);
         if ($j === false) {
             LoggerLog::debug("LoggerOptionConverter::substVars() no more variables");
             // no more variables
             if ($i == 0) {
                 // this is a simple string
                 LoggerLog::debug("LoggerOptionConverter::substVars() simple string");
                 return $val;
             } else {
                 // add the tail string which contails no variables and return the result.
                 $sbuf .= substr($val, $i);
                 LoggerLog::debug("LoggerOptionConverter::substVars():sbuf=[{$sbuf}]. Returning sbuf");
                 return $sbuf;
             }
         } else {
             $sbuf .= substr($val, $i, $j - $i);
             LoggerLog::debug("LoggerOptionConverter::substVars():sbuf=[{$sbuf}]:i={$i}:j={$j}.");
             $k = strpos($val, LOG4PHP_OPTION_CONVERTER_DELIM_STOP, $j);
             if ($k === false) {
                 LoggerLog::warn("LoggerOptionConverter::substVars() " . "'{$val}' has no closing brace. Opening brace at position {$j}.");
                 return '';
             } else {
                 $j += LOG4PHP_OPTION_CONVERTER_DELIM_START_LEN;
                 $key = substr($val, $j, $k - $j);
                 // first try in System properties
                 $replacement = LoggerOptionConverter::getSystemProperty($key, null);
                 // then try props parameter
                 if ($replacement == null and $props !== null) {
                     $replacement = @$props[$key];
                 }
                 if (!empty($replacement)) {
                     // Do variable substitution on the replacement string
                     // such that we can solve "Hello ${x2}" as "Hello p1"
                     // the where the properties are
                     // x1=p1
                     // x2=${x1}
                     $recursiveReplacement = LoggerOptionConverter::substVars($replacement, $props);
                     $sbuf .= $recursiveReplacement;
                 }
                 $i = $k + LOG4PHP_OPTION_CONVERTER_DELIM_STOP_LEN;
             }
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:85,代码来源:LoggerOptionConverter.php

示例10: append

 function append($event)
 {
     if ($this->canAppend) {
         $query = $this->layout->format($event);
         LoggerLog::debug("LoggerAppenderDb::append() query='{$query}'");
         $this->db->query($query);
     }
 }
开发者ID:5haman,项目名称:knowledgetree,代码行数:8,代码来源:LoggerAppenderDb.php

示例11: append

 /**
  * Do nothing. 
  * How I Love it !! :)
  * 
  * @param LoggerLoggingEvent $event
  */
 protected function append($event)
 {
     LoggerLog::debug("LoggerAppenderNull::append()");
 }
开发者ID:5haman,项目名称:knowledgetree,代码行数:10,代码来源:LoggerAppenderNull.php

示例12: finalizeConverter

 function finalizeConverter($c)
 {
     LoggerLog::debug("LoggerPatternParser::finalizeConverter() with char '{$c}'");
     $pc = null;
     switch ($c) {
         case 'c':
             $pc = new LoggerCategoryPatternConverter($this->formattingInfo, $this->extractPrecisionOption());
             LoggerLog::debug("LoggerPatternParser::finalizeConverter() CATEGORY converter.");
             // $this->formattingInfo->dump();
             $this->currentLiteral = '';
             break;
         case 'C':
             $pc = new LoggerClassNamePatternConverter($this->formattingInfo, $this->extractPrecisionOption());
             LoggerLog::debug("LoggerPatternParser::finalizeConverter() CLASSNAME converter.");
             //$this->formattingInfo->dump();
             $this->currentLiteral = '';
             break;
         case 'd':
             $dateFormatStr = LOG4PHP_LOGGER_PATTERN_PARSER_DATE_FORMAT_ISO8601;
             // ISO8601_DATE_FORMAT;
             $dOpt = $this->extractOption();
             if ($dOpt !== null) {
                 $dateFormatStr = $dOpt;
             }
             if ($dateFormatStr == 'ISO8601') {
                 $df = LOG4PHP_LOGGER_PATTERN_PARSER_DATE_FORMAT_ISO8601;
             } elseif ($dateFormatStr == 'ABSOLUTE') {
                 $df = LOG4PHP_LOGGER_PATTERN_PARSER_DATE_FORMAT_ABSOLUTE;
             } elseif ($dateFormatStr == 'DATE') {
                 $df = LOG4PHP_LOGGER_PATTERN_PARSER_DATE_FORMAT_DATE;
             } else {
                 $df = $dateFormatStr;
                 if ($df == null) {
                     $df = LOG4PHP_LOGGER_PATTERN_PARSER_DATE_FORMAT_ISO8601;
                 }
             }
             $pc = new LoggerDatePatternConverter($this->formattingInfo, $df);
             $this->currentLiteral = '';
             break;
         case 'F':
             $pc = new LoggerLocationPatternConverter($this->formattingInfo, LOG4PHP_LOGGER_PATTERN_PARSER_FILE_LOCATION_CONVERTER);
             LoggerLog::debug("LoggerPatternParser::finalizeConverter() File name converter.");
             //formattingInfo.dump();
             $this->currentLiteral = '';
             break;
         case 'l':
             $pc = new LoggerLocationPatternConverter($this->formattingInfo, LOG4PHP_LOGGER_PATTERN_PARSER_FULL_LOCATION_CONVERTER);
             LoggerLog::debug("LoggerPatternParser::finalizeConverter() Location converter.");
             //formattingInfo.dump();
             $this->currentLiteral = '';
             break;
         case 'L':
             $pc = new LoggerLocationPatternConverter($this->formattingInfo, LOG4PHP_LOGGER_PATTERN_PARSER_LINE_LOCATION_CONVERTER);
             LoggerLog::debug("LoggerPatternParser::finalizeConverter() LINE NUMBER converter.");
             //formattingInfo.dump();
             $this->currentLiteral = '';
             break;
         case 'm':
             $pc = new LoggerBasicPatternConverter($this->formattingInfo, LOG4PHP_LOGGER_PATTERN_PARSER_MESSAGE_CONVERTER);
             LoggerLog::debug("LoggerPatternParser::finalizeConverter() MESSAGE converter.");
             //formattingInfo.dump();
             $this->currentLiteral = '';
             break;
         case 'M':
             $pc = new LoggerLocationPatternConverter($this->formattingInfo, LOG4PHP_LOGGER_PATTERN_PARSER_METHOD_LOCATION_CONVERTER);
             //LogLog.debug("METHOD converter.");
             //formattingInfo.dump();
             $this->currentLiteral = '';
             break;
         case 'p':
             $pc = new LoggerBasicPatternConverter($this->formattingInfo, LOG4PHP_LOGGER_PATTERN_PARSER_LEVEL_CONVERTER);
             //LogLog.debug("LEVEL converter.");
             //formattingInfo.dump();
             $this->currentLiteral = '';
             break;
         case 'r':
             $pc = new LoggerBasicPatternConverter($this->formattingInfo, LOG4PHP_LOGGER_PATTERN_PARSER_RELATIVE_TIME_CONVERTER);
             LoggerLog::debug("LoggerPatternParser::finalizeConverter() RELATIVE TIME converter.");
             //formattingInfo.dump();
             $this->currentLiteral = '';
             break;
         case 't':
             $pc = new LoggerBasicPatternConverter($this->formattingInfo, LOG4PHP_LOGGER_PATTERN_PARSER_THREAD_CONVERTER);
             LoggerLog::debug("LoggerPatternParser::finalizeConverter() THREAD converter.");
             //formattingInfo.dump();
             $this->currentLiteral = '';
             break;
         case 'u':
             if ($this->i < $this->patternLength) {
                 $cNext = $this->pattern[$this->i];
                 if (ord($cNext) >= ord('0') && ord($cNext) <= ord('9')) {
                     $pc = new LoggerUserFieldPatternConverter($this->formattingInfo, (string) (ord($cNext) - ord('0')));
                     LoggerLog::debug("LoggerPatternParser::finalizeConverter() USER converter [{$cNext}].");
                     // formattingInfo.dump();
                     $this->currentLiteral = '';
                     $this->i++;
                 } else {
                     LoggerLog::warn("LoggerPatternParser::finalizeConverter() Unexpected char '{$cNext}' at position {$this->i}.");
                 }
             }
//.........这里部分代码省略.........
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:101,代码来源:LoggerPatternParser.php

示例13: setMaxDepth

 /**
  * Set maximum depth of this diagnostic context. If the current
  * depth is smaller or equal to <var>maxDepth</var>, then no
  * action is taken.
  *
  * <p>This method is a convenient alternative to multiple 
  * {@link pop()} calls. Moreover, it is often the case that at 
  * the end of complex call sequences, the depth of the NDC is
  * unpredictable. The {@link setMaxDepth()} method circumvents
  * this problem.
  *
  * @param integer $maxDepth
  * @see getDepth()
  * @static
  */
 function setMaxDepth($maxDepth)
 {
     LoggerLog::debug("LoggerNDC::setMaxDepth() maxDepth='{$maxDepth}'");
     $maxDepth = (int) $maxDepth;
     if ($maxDepth <= LOGGER_NDC_HT_SIZE) {
         if (LoggerNDC::getDepth() > $maxDepth) {
             $GLOBALS['log4php.LoggerNDC.ht'] = array_slice($GLOBALS['log4php.LoggerNDC.ht'], $maxDepth);
         }
         $GLOBALS['log4php.LoggerNDC.maxDepth'] = $maxDepth;
     }
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:26,代码来源:LoggerNDC.php

示例14: append

 function append($event)
 {
     if ($this->fp && $this->layout !== null) {
         LoggerLog::debug("LoggerAppenderFile::append()");
         @fwrite($this->fp, $this->layout->format($event));
     }
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:7,代码来源:LoggerAppenderFile.php

示例15: doAppend

 /**
  * @see LoggerAppender::doAppend()
  * @param LoggerLoggingEvent $event
  */
 public function doAppend($event)
 {
     LoggerLog::debug("LoggerAppenderSkeleton::doAppend()");
     if ($this->closed) {
         LoggerLog::debug("LoggerAppenderSkeleton::doAppend() Attempted to append to closed appender named [{$this->name}].");
         return;
     }
     if (!$this->isAsSevereAsThreshold($event->getLevel())) {
         LoggerLog::debug("LoggerAppenderSkeleton::doAppend() event level is less severe than threshold.");
         return;
     }
     $f = $this->getFirstFilter();
     while ($f !== null) {
         switch ($f->decide($event)) {
             case LOG4PHP_LOGGER_FILTER_DENY:
                 return;
             case LOG4PHP_LOGGER_FILTER_ACCEPT:
                 return $this->append($event);
             case LOG4PHP_LOGGER_FILTER_NEUTRAL:
                 $f = $f->getNext();
         }
     }
     $this->append($event);
 }
开发者ID:5haman,项目名称:knowledgetree,代码行数:28,代码来源:LoggerAppenderSkeleton.php


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