[Tickets #8942] Re: fresh install : Bad log level

bugs at horde.org bugs at horde.org
Tue Mar 30 13:22:29 UTC 2010


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

Ticket URL: http://bugs.horde.org/ticket/8942
------------------------------------------------------------------------------
  Ticket             | 8942
  Updated By         | rsalmon at mbpgroup.com
  Summary            | fresh install : Bad log level
  Queue              | Horde Base
  Version            | Git master
  Type               | Bug
  State              | Feedback
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


rsalmon at mbpgroup.com (2010-03-30 09:22) wrote:

> What were the log settings before you added those lines? The  
> "default" config file has logging disabled - is that what you were  
> seeing?

With $conf['log']['enabled'] set to false, I always get : Fatal error
  Bad log level
Details:
The full error message is logged in Horde's log file, and is shown  
below only to administrators. Non-administrative users will not see  
error details.

Horde_Log_Exception Object
(
     [message:protected] => Bad log level
     [string:Exception:private] =>
     [code:protected] => 0
     [file:protected] =>  
/var/www/html/git/horde/framework/Log/lib/Horde/Log/Logger.php
     [line:protected] => 120
     [trace:Exception:private] => Array
         (
             [0] => Array
                 (
                     [file] =>  
/var/www/html/git/horde/framework/Core/lib/Horde.php
                     [line] => 68
                     [function] => log
                     [class] => Horde_Log_Logger
                     [type] => ->
                     [args] => Array
                         (
                             [0] => Horde_Registry: retrieved appcache  
with cache ID  
horde_registry_appcache|1269942303|e7f88b8f7b9243b2b6f23c766a64bfa8
                             [1] => DEBUG
                             [2] => Array
                                 (
                                     [trace] => 2
                                 )

                         )

                 )

             [1] => Array
                 (
                     [file] =>  
/var/www/html/git/horde/framework/Core/lib/Horde/Registry.php
                     [line] => 1472
                     [function] => logMessage
                     [class] => Horde
                     [type] => ::
                     [args] => Array
                         (
                             [0] => Horde_Registry: retrieved appcache  
with cache ID  
horde_registry_appcache|1269942303|e7f88b8f7b9243b2b6f23c766a64bfa8
                             [1] => DEBUG
                         )

                 )

             [2] => Array
                 (
                     [file] =>  
/var/www/html/git/horde/framework/Core/lib/Horde/Registry.php
                     [line] => 427
                     [function] => _loadCacheVar
                     [class] => Horde_Registry
                     [type] => ->
                     [args] => Array
                         (
                             [0] => appcache
                         )

                 )

             [3] => Array
                 (
                     [file] =>  
/var/www/html/git/horde/framework/Core/lib/Horde/Registry.php
                     [line] => 354
                     [function] => _loadApplicationsCache
                     [class] => Horde_Registry
                     [type] => ->
                     [args] => Array
                         (
                             [0] =>
                         )

                 )

             [4] => Array
                 (
                     [file] =>  
/var/www/html/git/horde/framework/Core/lib/Horde/Registry.php
                     [line] => 179
                     [function] => __construct
                     [class] => Horde_Registry
                     [type] => ->
                     [args] => Array
                         (
                             [0] => 0
                         )

                 )

             [5] => Array
                 (
                     [file] => /var/www/html/horde/index.php
                     [line] => 14
                     [function] => appInit
                     [class] => Horde_Registry
                     [type] => ::
                     [args] => Array
                         (
                             [0] => horde
                             [1] => Array
                                 (
                                     [authentication] => none
                                     [nologintasks] => 1
                                 )

                         )

                 )

         )

     [previous:Exception:private] =>
)

> Also, it sounds like a different issue, but just in case, are you up  
> to date with Git?
Yes

> There were some recent fixes to logging - especially Bug #8937)...
It could be related, the issue I'm having only occurs when logging is  
disabled.

I created a patch inspired from Bug #8937 which fixes our issue :

--- Logger.php.org	2010-03-30 16:14:38.000000000 +0200
+++ Logger.php	2010-03-30 16:16:45.000000000 +0200
@@ -96,6 +96,12 @@
              throw new Horde_Log_Exception('No handlers were added');
          }

+
+		if (is_string($level)) {
+            $level = defined('Horde_Log::' . $level)
+                ? constant('Horde_Log::' . $level)
+                : Horde_Log::INFO;
+        }
          // Create an event array from the given arguments.
          if (is_array($event)) {
              // If we are passed an array, it must contain 'message'










More information about the bugs mailing list