예제 #1
0
파일: MY_Log.php 프로젝트: nauzet18/consig
 /**
  * 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 MY_Log()
 {
     parent::CI_Log();
     $config =& get_config();
     if (isset($config['show_in_log'])) {
         $show_in_log = $config['show_in_log'];
     } else {
         $show_in_log = "";
     }
     $this->log_path = $config['log_path'] != '' ? $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($config['log_threshold'])) {
         $this->_threshold = $config['log_threshold'];
     }
     if ($config['log_date_format'] != '') {
         $this->_date_fmt = $config['log_date_format'];
     }
 }
예제 #2
0
	function __construct()
    {
    	$this->mongo = new Mongo("localhost");
        parent::CI_Log();
    }