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


PHP LoggerAppender::getName方法代码示例

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


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

示例1: add

 /**
  * Adds an appender to the pool.
  * The appender must be named for this operation.
  * @param LoggerAppender $appender
  */
 public static function add(LoggerAppender $appender)
 {
     $name = $appender->getName();
     if (empty($name)) {
         trigger_error('log4php: Cannot add unnamed appender to pool.', E_USER_WARNING);
         return;
     }
     if (isset(self::$appenders[$name])) {
         trigger_error("log4php: Appender [{$name}] already exists in pool. Overwriting existing appender.", E_USER_WARNING);
     }
     self::$appenders[$name] = $appender;
 }
开发者ID:unkerror,项目名称:Budabot,代码行数:17,代码来源:LoggerAppenderPool.php

示例2: isAttached

 /**
  * Checks whether an appender is attached to this logger instance.
  *
  * @param LoggerAppender $appender
  * @return boolean
  */
 public function isAttached(LoggerAppender $appender)
 {
     return isset($this->appenders[$appender->getName()]);
 }
开发者ID:Lyonard,项目名称:PHPExperiments,代码行数:10,代码来源:Logger.php

示例3: isAttached

 /**
  * Is the appender passed as parameter attached to this category?
  *
  * @param LoggerAppender $appender
  */
 public function isAttached($appender)
 {
     return isset($this->aai[$appender->getName()]);
 }
开发者ID:laiello,项目名称:lion-framework,代码行数:9,代码来源:Logger.php

示例4: isAttached

 /**
  * Is the appender passed as parameter attached to this category?
  *
  * @param LoggerAppender $appender
  */
 function isAttached($appender)
 {
     return in_array($appender->getName(), array_keys($this->aai));
 }
开发者ID:Bobsel,项目名称:gn-tic,代码行数:9,代码来源:LoggerCategory.php

示例5: createAppenderFilter

 /**
  * Parses filter config, creates the filter and adds it to the appender's 
  * filter chain.
  * @param LoggerAppender $appender
  * @param array $config Filter configuration.
  */
 private function createAppenderFilter(LoggerAppender $appender, $config)
 {
     $name = $appender->getName();
     $class = $config['class'];
     if (!class_exists($class)) {
         $this->warn("Nonexistant filter class [{$class}] specified on appender [{$name}]. Skipping filter definition.");
         return;
     }
     $filter = new $class();
     if (!$filter instanceof LoggerFilter) {
         $this->warn("Invalid filter class [{$class}] sepcified on appender [{$name}]. Skipping filter definition.");
         return;
     }
     if (isset($config['params'])) {
         $this->setOptions($filter, $config['params']);
     }
     $filter->activateOptions();
     $appender->addFilter($filter);
 }
开发者ID:NetworkCedu,项目名称:saigon,代码行数:25,代码来源:LoggerConfiguratorDefault.php


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