__construct() public method

Class constructor
public __construct ( ) : void
return void
示例#1
0
 public function __construct()
 {
     parent::__construct();
     // --------------------------------------------------------------------------
     //	Ignore whatever the aprent constructor says about whether logging is
     //	enabled or not. We'll work it out below.
     $this->_enabled = NULL;
 }
示例#2
0
 public function __construct()
 {
     parent::__construct();
     $config =& get_config();
     $this->_levels = $config['log_levels'];
     $this->_template = $config['log_template'];
     $this->_ip = $this->_getIp();
     $this->_logId = intval(microtime(true) * 1000000) + mt_rand(0, 999);
 }
示例#3
0
 function __construct()
 {
     try {
         $this->redis = new Redis();
         $this->redis_enabled = $this->redis->pconnect('127.0.0.1', 6379, 0.01);
     } catch (Exception $e) {
     }
     if (isset($_SERVER['HTTP_HOST'])) {
         $this->log_prefix = $_SERVER['HTTP_HOST'];
     } else {
         $this->log_prefix = basename(realpath(__DIR__ . '/../../../'));
     }
     parent::__construct();
 }
示例#4
0
 /**
  * Constructor
  *
  * @access    public
  * @param    array the array of loggable items
  * @param    string    the log file path
  * @param     string     the error threshold
  * @param    string    the date formatting codes
  */
 function __construct()
 {
     parent::__construct();
     $this->config =& get_config();
     if (isset($this->config['show_in_log'])) {
         $show_in_log = $this->config['show_in_log'];
     } else {
         $show_in_log = "";
     }
     $this->log_path = $this->config['log_path'] != '' ? $this->config['log_path'] : BASEPATH . 'logs/';
     if (!is_dir($this->log_path) or !is_really_writable($this->log_path)) {
         $this->_enabled = FALSE;
     }
     if (is_array($show_in_log)) {
         $this->_logging_array = $show_in_log;
     }
     if (is_numeric($this->config['log_threshold'])) {
         $this->_threshold = $this->config['log_threshold'];
     }
     if ($this->config['log_date_format'] != '') {
         $this->_date_fmt = $this->config['log_date_format'];
     }
 }
示例#5
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $config =& get_config();
     if (isset($config['mylog_cats'])) {
         $mylog_cats = $config['mylog_cats'];
     } else {
         $mylog_cats = "";
     }
     $this->_enable_sub_directory = isset($config['mylog_sub_directories']) ? $config['mylog_sub_directories'] : false;
     $this->log_path = $config['log_path'] != '' ? $config['log_path'] : APPPATH . 'logs/';
     if (!is_dir($this->log_path) or !is_really_writable($this->log_path)) {
         $this->_enabled = FALSE;
     }
     if (is_array($mylog_cats)) {
         $this->_logging_array = $mylog_cats;
     }
     if (is_numeric($config['log_threshold'])) {
         $this->_threshold = $config['log_threshold'];
     }
     if ($config['log_date_format'] != '') {
         $this->_date_fmt = $config['log_date_format'];
     }
 }
示例#6
0
 function __construct()
 {
     parent::__construct();
 }
示例#7
0
文件: MY_Log.php 项目: jehmehta/eagle
 function MY_Log()
 {
     parent::__construct();
 }
示例#8
0
 /**
  * Constructor
  *
  * @access  public
  */
 function MY_Log()
 {
     $this->_uniq = uniqid(time());
     parent::__construct();
 }