From: Chuck Hagenbuch Date: Wed, 3 Jun 2009 15:24:39 +0000 (-0400) Subject: report the bad log level in the exception X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e5efd8e9df9fcb25b3e53c01b8c3e770a795300c;p=horde.git report the bad log level in the exception --- diff --git a/framework/Log/lib/Horde/Log/Logger.php b/framework/Log/lib/Horde/Log/Logger.php index 5a0617a66..8adcc65c1 100644 --- a/framework/Log/lib/Horde/Log/Logger.php +++ b/framework/Log/lib/Horde/Log/Logger.php @@ -75,11 +75,11 @@ class Horde_Log_Logger */ public function __call($method, $params) { - $level = strtoupper($method); - if (($level = array_search($level, $this->_levels)) !== false) { + $levelName = strtoupper($method); + if (($level = array_search($levelName, $this->_levels)) !== false) { $this->log(array_shift($params), $level); } else { - throw new Horde_Log_Exception('Bad log level'); + throw new Horde_Log_Exception('Bad log level ' . $levelName); } }