logMessage() public method

TODO: This should be done via Horde_Log or the equivalent.
public logMessage ( mixed $message, integer $priority = 'INFO' )
$message mixed Either a string or a PEAR_Error object.
$priority integer The priority of the message. One of: - EMERG - ALERT - CRIT - ERR - WARN - NOTICE - INFO - DEBUG
Exemplo n.º 1
0
 public function logMessage($message, $priority = 'INFO')
 {
     parent::logMessage($message, $priority);
     echo $this->_logtext;
     $this->_logtext = '';
 }
Exemplo n.º 2
0
 /**
  * Logs a message in the backend.
  *
  * @param mixed $message    Either a string or a PEAR_Error object.
  * @param string $priority  The priority of the message. One of:
  *                           - EMERG
  *                           - ALERT
  *                           - CRIT
  *                           - ERR
  *                           - WARN
  *                           - NOTICE
  *                           - INFO
  *                           - DEBUG
  */
 public function logMessage($message, $priority = 'INFO')
 {
     $trace = debug_backtrace();
     $trace = $trace[1];
     // Internal logging to $this->_logtext.
     parent::logMessage($message, $priority);
     // Logging to Horde log:
     Horde::log($message, $priority, array('file' => $trace['file'], 'line' => $trace['line']));
 }