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


PHP Logger::instance方法代码示例

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


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

示例1: getInstance

 public static function getInstance($name, $level = 1)
 {
     if (is_null(self::$instance)) {
         self::$instance = new Logger($name, $level);
     }
     return self::$instance;
 }
开发者ID:tofindme,项目名称:work_note,代码行数:7,代码来源:logger.php

示例2: logger

/**
 * Returns a logger identified by the given name.
 *
 * If the logger does not exist it is created.
 * 
 * @param  string  $name  Name of the logger
 *
 * @return   object  Logger
 */
function logger($name = null)
{
    if (null === $name) {
        return Logger::instance();
    }
    return Logger::instance()->get_logger($name);
}
开发者ID:prggmr,项目名称:xpspl,代码行数:16,代码来源:logger.php

示例3: getInstance

 /**
  * returns the instance created by its first invoke.
  *
  * @return Logger
  */
 public static function getInstance()
 {
     if (null === self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
开发者ID:Stephan123,项目名称:markdown_blog,代码行数:12,代码来源:Logger.php

示例4: getInstance

 /**
  * Method getInstance
  * @access static
  * @return mixed
  * @since 1.1.12
  */
 public static function getInstance()
 {
     if (is_null(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
开发者ID:kxopa,项目名称:WebSite-PHP,代码行数:13,代码来源:Logger.class.php

示例5: getInstance

 /**
  *
  * Return logger instance or create new instance
  *
  * @return object (PDO)
  *
  * @access public
  *
  */
 public static function getInstance()
 {
     if (!self::$instance) {
         self::$instance = new Logger();
     }
     return self::$instance;
 }
开发者ID:junctiontech,项目名称:dbho,代码行数:16,代码来源:class_logger.php

示例6: getInstance

 public static function getInstance($filepath = 0, $priority = 0)
 {
     if (!isset(self::$instance)) {
         self::$instance = new Logger($filepath, $priority);
     }
     return self::$instance;
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:7,代码来源:logger.php

示例7: self

 public static function &getInstance()
 {
     if (self::$instance === false) {
         self::$instance = new self();
     }
     return self::$instance;
 }
开发者ID:ahmed555,项目名称:Cupcake,代码行数:7,代码来源:logger.php

示例8: getLogger

 static function getLogger()
 {
     if (self::$instance == null) {
         self::$instance = new Logger("logger");
     }
     return self::$instance;
 }
开发者ID:Esisto,项目名称:IoEsisto,代码行数:7,代码来源:logger.php

示例9: get

 public static function get()
 {
     if (self::$instance == null) {
         self::$instance = new self();
     }
     return self::$instance;
 }
开发者ID:adrianpietka,项目名称:bfrss,代码行数:7,代码来源:logger.php

示例10: getSingleton

 public static function getSingleton($pathData, $pathSep, $file = 'cron.log')
 {
     if (self::$instance == null) {
         self::$instance = new Logger($pathData, $pathSep, $file);
     }
     return self::$instance;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:7,代码来源:class.logger.php

示例11: get_instance

 /**
  * Singleton, returns class if stored, attemps to call constructor and initilize if not stored
  * 
  * @param PDO|null $loggingDB connection to logging database
  * @param string $transactionID unique identifier created at application startup
  */
 public static function get_instance(PDO $loggingDB = null, $transactionID = null)
 {
     if (self::$instance === null) {
         self::$instance = new self($loggingDB, $transactionID);
         return self::$instance;
     }
     return self::$instance;
 }
开发者ID:RobGriggs,项目名称:ReadySetJet-2x,代码行数:14,代码来源:Logger.php

示例12: setLogger

 /**
  *
  *
  * @param LoggerInterface $value Specify a new value to set the logger to.
  */
 public static function setLogger(LoggerInterface $value = null)
 {
     if ($value !== null) {
         self::$instance = $value;
     } else {
         self::$instance = new BaseLogger();
     }
 }
开发者ID:sitexa,项目名称:vanilla,代码行数:13,代码来源:class.logger.php

示例13: getInstance

 public function getInstance()
 {
     // Instantiate itself if not instantiated
     if (self::$instance === NULL) {
         self::$instance = new Logger();
     }
     return self::$instance;
 }
开发者ID:silly-exp,项目名称:send_sms,代码行数:8,代码来源:Logger.php

示例14: getInstance

 protected static function getInstance()
 {
     if (self::$instance === NULL) {
         $class = __CLASS__;
         self::$instance = new $class();
     }
     return self::$instance;
 }
开发者ID:robotamer,项目名称:oldstuff,代码行数:8,代码来源:Logger.php

示例15: logfile

 /**
  * Simple static method to log lines to the logfile.
  *
  * @param string $value message
  * @param string $path relative path to temporary directory
  * @param boolean $success
  * @author sl
  */
 public static function logfile($value)
 {
     if (self::$instance == null) {
         self::$instance = new Logger();
     }
     $value = preg_replace('/\\n|\\s{2,}/i', '', $value);
     self::$instance->log($value);
 }
开发者ID:cljk,项目名称:kimai,代码行数:16,代码来源:logger.class.php


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