Otherwise, things like framework libraries that throw exceptions and
provide way of logging exceptions (e.g. Horde_Imap_Client) give
backtraces for items that should not need to be logged (e.g.
authentication failures).
parent::log($eventob);
/* If logging an exception, log the backtrace too. */
- if ($event instanceof Exception) {
- if (class_exists('Horde_Support_Backtrace')) {
- parent::log((string)new Horde_Support_Backtrace($event), $priority);
- }
+ if (($event instanceof Exception) &&
+ class_exists('Horde_Support_Backtrace')) {
+ parent::log((string)new Horde_Support_Backtrace($event), Horde_Log::DEBUG);
}
/* Restore original locale and timezone. */