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 |
public function logMessage($message, $priority = 'INFO') { parent::logMessage($message, $priority); echo $this->_logtext; $this->_logtext = ''; }
/** * 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'])); }