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


PHP Logger::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Constructor
  *
  * @param integer $level initial log level
  */
 public function __construct($level = null)
 {
     parent::__construct('root');
     if ($level == null) {
         $level = LoggerLevel::getLevelAll();
     }
     $this->setLevel($level);
 }
开发者ID:RobertWang,项目名称:sabre-zarafa,代码行数:13,代码来源:LoggerRoot.php

示例2: __construct

 public function __construct()
 {
     // enable logging
     parent::__construct();
     // check if session exists
     if (session_id() == '') {
         session_start();
     }
     self::initCart();
 }
开发者ID:efoft,项目名称:orion,代码行数:10,代码来源:Cart.class.php

示例3: __construct

 /**
  * Used in conjunction with IoC Setters for backwards compatibility
  *
  * @param $loggerFile
  * @param $datesLocalTimeZone
  * @param bool $loggerEnabled
  * @param int $loggerLevel
  * @param string $loggerAllow
  * @param string $loggerDeny
  */
 public function __construct($loggerFile, $datesLocalTimeZone, $loggerEnabled = true, $loggerLevel = LOG_DEBUG, $loggerAllow = 'all', $loggerDeny = 'none')
 {
     parent::__construct($loggerEnabled, $loggerLevel, $loggerAllow, $loggerDeny);
     if ($datesLocalTimeZone) {
         date_default_timezone_set($datesLocalTimeZone);
     } else {
         date_default_timezone_set('US/Eastern');
     }
     $this->logFile = $loggerFile;
 }
开发者ID:wb-crowdfusion,项目名称:crowdfusion,代码行数:20,代码来源:FileLogger.php

示例4: __construct

 public function __construct(Database $db, $bkpdir)
 {
     // enable logging
     parent::__construct();
     $this->db = $db;
     if (file_exists($bkpdir) && is_writable($bkpdir)) {
         $this->bkpdir = $bkpdir;
     } else {
         throw new Exception('Backup directory ' . $bkpdir . ' either dosn\'t exist or not writable');
     }
 }
开发者ID:efoft,项目名称:orion,代码行数:11,代码来源:Backup.class.php

示例5: __construct

 /**
  * This function first does some checks of the structure than set $this->structure.
  *
  * @access  private
  * @param   array   Array where keys are attrib names, values are CSV fields index
  */
 public function __construct($structure)
 {
     // enable logging
     parent::__construct();
     if (!array_key_exists('id', $structure)) {
         throw new Exception('Catalog structure must have attribute `id` defined');
     } else {
         if ($structure['id'] !== 'auto' && !is_numeric($structure['id'])) {
             throw new Exception('Structure ID must be ether CSV field number or `auto`');
         }
     }
     $this->structure = $structure;
 }
开发者ID:efoft,项目名称:orion,代码行数:19,代码来源:CatalogCSV.class.php

示例6: __construct

 /**
  *  Connects to SQL DB. MySQL and SQLite are supported.
  *
  * @access  public
  * @param   string  driver = (mysql|sqlite)
  * @param   string  dsn = "mysql:host=$host;dbname=$name;charset=$char" or "sqlite:$dbfile"
  * @param   string  dbuser
  * @param   string  dbpass
  */
 public function __construct($driver, $dsn, $dbuser = '', $dbpass = '')
 {
     //enable logging
     parent::__construct();
     try {
         if ($driver === 'mysql') {
             if ($dbuser === '' || $dbpass === '') {
                 throw new PDOException('DB username & password are required');
             }
             $this->dbh = new PDO($dsn, $dbuser, $dbpass);
         } else {
             if ($driver === 'sqlite') {
                 $this->dbh = new PDO($dsn);
             } else {
                 throw new PDOException('DB driver is not supported');
             }
         }
     } catch (PDOException $e) {
         throw new PDOException($e->getMessage());
     }
 }
开发者ID:efoft,项目名称:orion,代码行数:30,代码来源:Database.class.php

示例7: __construct

 /**
  * Class constructor.  Sets defaults.
  *
  * We need to set the time the logger was created.
  *
  * @param array    Hash of all values to override in the class
  */
 public function __construct($args)
 {
     parent::__construct($args);
     $this->start_time = $this->get_time();
 }
开发者ID:FreeLawFounders,项目名称:statedecoded,代码行数:12,代码来源:class.DebugLogger.inc.php

示例8: __construct

 public function __construct(Database $db)
 {
     // enable logging
     parent::__construct();
     $this->db = $db;
 }
开发者ID:efoft,项目名称:orion,代码行数:6,代码来源:Staff.class.php

示例9: __construct

 /**
  * Constructor.
  *
  * @param   array  &$options  Log object options.
  *
  * @since   11.1
  * @deprecated  13.3
  */
 public function __construct(array &$options)
 {
     Log::add('JLogger is deprecated. Use JLogLogger instead.', Log::WARNING, 'deprecated');
     parent::__construct($options);
 }
开发者ID:Alibek,项目名称:joomla-platform-namespace-example,代码行数:13,代码来源:Logger.php

示例10:

 function __construct($minimum, $filehandle, $dateformat = "r")
 {
   $this->filehandle = $filehandle;
   $this->dateformat = $dateformat;
   return parent::__construct($minimum);
 }
开发者ID:Jaybee-,项目名称:php-tftpserver,代码行数:6,代码来源:tftpserver.php

示例11:

 function __construct($env)
 {
     parent::__construct($env);
 }
开发者ID:BidTorrent,项目名称:track,代码行数:4,代码来源:ProdLogger.class.php

示例12:

 function __construct($env)
 {
     parent::__construct($env);
     ini_set("error_reporting", E_ALL);
     ini_set("display_errors", "On");
 }
开发者ID:BidTorrent,项目名称:track,代码行数:6,代码来源:DebugLogger.class.php

示例13: __construct

 /**
  * Rewrite Magento style $name (Company_Module_Directory_Class) or PHP namespace $name
  * (Company\Module\Directory\Class) to log4php style package (Company.Module.Directory.Class).
  * @param string $name
  */
 public function __construct($name)
 {
     parent::__construct(Praxigento_Log_Logger::rewriteName($name));
 }
开发者ID:praxigento,项目名称:mage_ext_log4php,代码行数:9,代码来源:Logger.php

示例14: __construct

 public function __construct($filename, Formatter $formatter)
 {
     parent::__construct();
     self::$filename = $filename;
     self::$formatter = $formatter;
 }
开发者ID:seagoj,项目名称:devtools,代码行数:6,代码来源:FileLogger.php

示例15: __construct

 public function __construct(Formatter $formatter)
 {
     $this->formatter = $formatter;
     parent::__construct();
 }
开发者ID:seagoj,项目名称:devtools,代码行数:5,代码来源:StdOutLogger.php


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