示例#1
0
 /**
  * Accessor to KLogger class; this makes using the class significant faster!
  *
  * @access public
  * @return object
  *
  **/
 public function log()
 {
     if ($this->debugLevel < 8) {
         // 8 = OFF
         if (!is_object($this->logObj)) {
             $debug_dir = $this->sanitizePath(dirname(__FILE__) . '/../../../../../temp/logs');
             if (!file_exists($debug_dir)) {
                 mkdir($debug_dir, 0777);
             }
             $this->logObj = LEPTON_Helper_KLogger::instance($debug_dir, $this->debugLevel);
         }
         return $this->logObj;
     }
     return $this;
 }
示例#2
0
 /**
  * Sets the date format used by all instances of KLogger
  *
  * @param string $dateFormat Valid format string for date()
  */
 public static function setDateFormat($dateFormat)
 {
     self::$_dateFormat = $dateFormat;
 }