示例#1
0
 /**
  * Logs an entry 
  * 
  * @param array|string $entry
  * @see JLog::addEntry options
  * @return mixed
  */
 public function log($entry, $level = LOG_LEVEL_INFO)
 {
     if (!is_array($entry)) {
         $entry = array('comment' => $entry, 'level' => $level);
     }
     $this->_log->addEntry($entry);
     return $this;
 }
示例#2
0
 /**
  * Send a Fatal message to the log
  *
  * @param string    $message    The message for the log
  * @param Exception $throwable  The Exception for the log
  */
 public function fatal($message, $throwable = null)
 {
     if (!$this->isLevelEnabled(RokCommon_Logger::FATAL)) {
         return;
     }
     $errorlog = array();
     $errorlog['level'] = 'FATAL';
     $errorlog['comment'] = $message;
     $this->instance->addEntry($errorlog);
 }