[Tickets #8937] Re: Horde::logMessage calls Horde_Log_Logger::log bad values

bugs at horde.org bugs at horde.org
Mon Mar 29 20:53:32 UTC 2010


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/8937
------------------------------------------------------------------------------
  Ticket             | 8937
  Updated By         | Michael Slusarz <slusarz at horde.org>
  Summary            | Horde::logMessage calls Horde_Log_Logger::log bad
                     | values
  Queue              | Horde Framework Packages
  Version            | Git master
  Type               | Bug
  State              | Feedback
  Priority           | 2. Medium
  Milestone          |
  Patch              | 1
  Owners             | Michael Slusarz
------------------------------------------------------------------------------


Michael Slusarz <slusarz at horde.org> (2010-03-29 16:53) wrote:

> Well, Horde::logMessage calls Horde_Log_Logger::log not  
> Horde_Core_Log_Logger::log, despite the comment's reference to the  
> latter.

This is incorrect.  Horde::logMessage() calls the injector and asks  
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.






More information about the bugs mailing list