Пример #1
0
 /**
  * Log a message at a priority.
  * If called with no arguments at all, this method will return
  * the current Zend_Log instance.
  *
  * @param  string   $message   Message to log
  * @param  integer  $priority  Priority of message
  * @param  mixed    $extras    Extra information to log in event
  * @return void
  * @throws Zend_Log_Exception
  */
 public static function log($message = null, $priority = null, $extras = null)
 {
     if (is_null(self::$log)) {
         // we initialize the log with the Null Writer in case the user
         // does not specify any other writer
         self::$log = new \Zend_Log(\Zend_Log_Writer_Null::factory(array()));
     }
     if (is_null($message) && is_null($priority) && is_null($extras)) {
         return self::$log;
     }
     self::$log->log($message, $priority, $extras);
 }