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


PHP LoggerManager::getLoggerRepository方法代码示例

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


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

示例1: configure

 /**
  * Configure the default repository using the resource pointed by <b>url</b>.
  * <b>Url</b> is any valid resurce as defined in {@link PHP_MANUAL#file} function.
  * Note that the resource will be search with <i>use_include_path</i> parameter 
  * set to "1".
  *
  * @param string $url
  * @return boolean configuration result
  * @static
  */
 function configure($url = '')
 {
     $configurator = new LoggerPropertyConfigurator();
     $repository =& LoggerManager::getLoggerRepository();
     return $configurator->doConfigure($url, $repository);
 }
开发者ID:ruckfull,项目名称:taobaocrm,代码行数:16,代码来源:LoggerPropertyConfigurator.php

示例2: getDefaultHierarchy

 /**
  * Please use {@link LoggerManager::getLoggerRepository()} instead.
  * @deprecated 
  */
 public function getDefaultHierarchy()
 {
     return LoggerManager::getLoggerRepository();
 }
开发者ID:laiello,项目名称:lion-framework,代码行数:8,代码来源:Logger.php

示例3: setupLogging

 function setupLogging()
 {
     global $default;
     $oKTConfig =& KTConfig::getSingleton();
     if (!defined('APP_NAME')) {
         define('APP_NAME', $oKTConfig->get('ui/appName', 'KnowledgeTree'));
     }
     define('KT_LOG4PHP_DIR', KT_DIR . '/thirdparty/apache-log4php/src/main/php' . DIRECTORY_SEPARATOR);
     define('LOG4PHP_CONFIGURATION', KT_DIR . '/config/ktlog.ini');
     define('LOG4PHP_DEFAULT_INIT_OVERRIDE', true);
     require_once KT_LOG4PHP_DIR . 'LoggerManager.php';
     require_once KT_LOG4PHP_DIR . 'LoggerPropertyConfigurator.php';
     $configurator = new LoggerPropertyConfigurator();
     $repository = LoggerManager::getLoggerRepository();
     $properties = @parse_ini_file(LOG4PHP_CONFIGURATION);
     $properties['log4php.appender.default'] = 'LoggerAppenderDailyFile';
     $properties['log4php.appender.default.layout'] = 'LoggerPatternLayout';
     $properties['log4php.appender.default.layout.conversionPattern'] = '%d{Y-m-d | H:i:s} | %p | %t | %r | %X{userid} | %X{db} | %c | %M | %m%n';
     $properties['log4php.appender.default.datePattern'] = 'Y-m-d';
     $logDir = $oKTConfig->get('urls/logDirectory');
     $properties['log4php.appender.default.file'] = $logDir . '/kt%s.' . KTUtil::running_user() . '.log.txt';
     // get the log level set in the configuration settings to override the level set in ktlog.ini
     // for the default / main logging. Additional logging can be configured through the ini file
     $logLevel = $oKTConfig->get('KnowledgeTree/logLevel');
     $properties['log4php.rootLogger'] = $logLevel . ', default';
     session_start();
     $configurator->doConfigureProperties($properties, $repository);
     $userId = isset($_SESSION['userID']) ? $_SESSION['userID'] : 'n/a';
     LoggerMDC::put('userid', $userId);
     LoggerMDC::put('db', $oKTConfig->get('db/dbName'));
     $default->log = LoggerManager::getLogger('default');
     $default->queryLog = LoggerManager::getLogger('sql');
     $default->timerLog = LoggerManager::getLogger('timer');
     $default->phpErrorLog = LoggerManager::getLogger('php');
 }
开发者ID:5haman,项目名称:knowledgetree,代码行数:35,代码来源:dmsDefaults.php

示例4: shutdown

 /**
  * Safely close all appenders.
  * @static
  */
 function shutdown()
 {
     $repository =& LoggerManager::getLoggerRepository();
     return $repository->shutdown();
 }
开发者ID:sacredwebsite,项目名称:vtigercrm,代码行数:9,代码来源:LoggerManager.php

示例5: configure

 /**
  * Configure the default repository using the resource pointed by <b>url</b>.
  * <b>Url</b> is any valid resource as defined in {@link PHP_MANUAL#file} function.
  * Note that the resource will be search with <i>use_include_path</i> parameter 
  * set to "1".
  *
  * @param string $url
  * @static
  */
 public static function configure($url = '')
 {
     $configurator = new LoggerDOMConfigurator();
     $repository =& LoggerManager::getLoggerRepository();
     return $configurator->doConfigure($url, $repository);
 }
开发者ID:rrsc,项目名称:freemed,代码行数:15,代码来源:LoggerDOMConfigurator.php

示例6: getRenderedMessage

 /**
  * Render message.
  * @return string
  */
 function getRenderedMessage()
 {
     if ($this->renderedMessage === null and $this->message !== null) {
         if (is_string($this->message)) {
             $this->renderedMessage = $this->message;
         } else {
             if ($this->logger !== null) {
                 $repository =& $this->logger->getLoggerRepository();
             } else {
                 $repository =& LoggerManager::getLoggerRepository();
             }
             if (method_exists($repository, 'getrenderermap')) {
                 $rendererMap =& $repository->getRendererMap();
                 $this->renderedMessage = $rendererMap->findAndRender($this->message);
             } else {
                 $this->renderedMessage = (string) $this->message;
             }
         }
     }
     return $this->renderedMessage;
 }
开发者ID:Bobsel,项目名称:gn-tic,代码行数:25,代码来源:LoggerLoggingEvent.php


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