Summary | Horde::logMessage calls Horde_Log_Logger::log bad values |
Queue | Horde Framework Packages |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | slusarz (at) horde (dot) org |
Requester | jonathan (at) findyourfans (dot) com |
Created | 03/27/2010 (5531 days ago) |
Due | |
Updated | 03/30/2010 (5528 days ago) |
Assigned | 03/27/2010 (5531 days ago) |
Resolved | 03/30/2010 (5528 days ago) |
Milestone | |
Patch | Yes |
<URL:http://git.horde.org/diff.php/framework/Core/lib/Horde/Core/Log/Logger.php?rt=horde-git&r1=b24b186ef95eec69c770bf491edef85fcb12c5f0&r2=a4a808da9446fd1d5ef4a35095df6e045794aaf8> does seem to fix it for
me.
Horde_Core_Log_Logger::log, despite the comment's reference to the
latter.
for the instance bound to 'Horde_Log_Logger'. This binder
(Horde_Core_Binder_Logger) returns a Horde_Core_Log_Logger instance
(see Core/lib/Horde/Core/Binder/Logger.php).
The injector pattern is necessary to ensure that the Horde_Log package
is not dependent on any given Horde installation - in other words,
Horde_Log can be used independently of Horde the application.
Horde_Log requires an integer input for log() - mainly because this
maps with other logger API interfaces. However, using Horde_Log
integer logging constants is troubling in Horde since the log level is
defined in a configuration file, which may be loaded before Horde_Log
itself is available. Thus, the need to allow strings to be used for
log levels within Horde.
Horde_Core_Log_Logger should do the conversion. However, there was
a certain case where this conversion wasn't happening and that has
been fix. Additionally, this same case was exiting the entire
script, which wasn't necessary.
Horde_Core_Log_Logger::log, despite the comment's reference to the
latter. Horde_Core_Log_Logger extends Horde_Log_Logger, changing the
behavior of the log method. I'm not sure exactly how this should be
fixed, but the inconsistency between those two log methods seems
unnecessarily confusing.
Assigned to Michael Slusarz
State ⇒ Feedback
Priority ⇒ 2. Medium
Horde_Core_Log_Logger should do the conversion. However, there was a
certain case where this conversion wasn't happening and that has been
fix. Additionally, this same case was exiting the entire script,
which wasn't necessary.
See if these changes fix things for you.
Bug #8937: Convert priority to integer; don't exit prematurelyhttp://git.horde.org/diff.php/framework/Core/lib/Horde/Core/Log/Logger.php?rt=horde-git&r1=b24b186ef95eec69c770bf491edef85fcb12c5f0&r2=a4a808da9446fd1d5ef4a35095df6e045794aaf8
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ Horde::logMessage calls Horde_Log_Logger::log bad values
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ Yes
New Attachment: horde_log.patch
State ⇒ Unconfirmed
level" error pages until I tracked down the problem in the Horde class
in "framework/Core/lib/Horde.php" where the logMessage method was
passing Horde_Log_Logger::log a $priority string instead of the
integer $level it
expected.