<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>fresh install : Bad log level</title> 
  <pubDate>Fri, 10 Apr 2026 14:37:18 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/8942</link> 
  <atom:link rel="self" type="application/rss+xml" title="fresh install : Bad log level" href="https://bugs.horde.org/ticket/8942/rss" /> 
  <description>fresh install : Bad log level</description> 
 
   
   
  <item> 
   <title>using php-5.3.2, httpd-2.2.3

re-installing from scratch h</title> 
   <description>using php-5.3.2, httpd-2.2.3

re-installing from scratch horde, I get the following error  (horde/test.php) using the default config files :
Fatal error :
Bad log level
[ligne 120 de /var/www/html/git/horde/framework/Log/lib/Horde/Log/Logger.php]


output of $this and $event gives :
Horde_Log_Logger Object
(
    [_levels:Horde_Log_Logger:private] =&gt; Array
        (
            [0] =&gt; EMERG
            [1] =&gt; ALERT
            [2] =&gt; CRIT
            [3] =&gt; ERR
            [4] =&gt; WARN
            [5] =&gt; NOTICE
            [6] =&gt; INFO
            [7] =&gt; DEBUG
        )

    [_handlers:Horde_Log_Logger:private] =&gt; Array
        (
            [0] =&gt; Horde_Log_Handler_Null Object
                (
                    [_options:protected] =&gt; Array
                        (
                        )

                    [_filters:protected] =&gt; Array
                        (
                        )

                )

        )

    [_filters:Horde_Log_Logger:private] =&gt; Array
        (
        )

)
Array
(
    [message] =&gt; Hook pushapp in application horde not called.
    [level] =&gt; DEBUG
)


If I add the following lines to conf.php, everything works fine:
$conf[&#039;log&#039;][&#039;priority&#039;] = &#039;DEBUG&#039;;
$conf[&#039;log&#039;][&#039;ident&#039;] = &#039;HORDE&#039;;
$conf[&#039;log&#039;][&#039;name&#039;] = &#039;/tmp/horde.log&#039;;
$conf[&#039;log&#039;][&#039;params&#039;][&#039;append&#039;] = true;
$conf[&#039;log&#039;][&#039;params&#039;][&#039;format&#039;] = &#039;default&#039;;
$conf[&#039;log&#039;][&#039;type&#039;] = &#039;file&#039;;
$conf[&#039;log&#039;][&#039;enabled&#039;] = true;

</description> 
   <pubDate>Tue, 30 Mar 2010 10:06:24 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8942#t58342</link> 
  </item> 
   
  <item> 
   <title>What were the log settings before you added those lines? The</title> 
   <description>What were the log settings before you added those lines? The &quot;default&quot; config file has logging disabled - is that what you were seeing?

Also, it sounds like a different issue, but just in case, are you up to date with Git? There were some recent fixes to logging - especially Bug #8937)...</description> 
   <pubDate>Tue, 30 Mar 2010 12:22:27 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8942#t58343</link> 
  </item> 
   
  <item> 
   <title>&gt; What were the log settings before you added those lines? T</title> 
   <description>&gt; What were the log settings before you added those lines? The 
&gt; &quot;default&quot; config file has logging disabled - is that what you were 
&gt; seeing?

With $conf[&#039;log&#039;][&#039;enabled&#039;] set to false, I always get : Fatal error
 Bad log level
Details:
The full error message is logged in Horde&#039;s log file, and is shown below only to administrators. Non-administrative users will not see error details.

Horde_Log_Exception Object
(
    [message:protected] =&gt; Bad log level
    [string:Exception:private] =&gt; 
    [code:protected] =&gt; 0
    [file:protected] =&gt; /var/www/html/git/horde/framework/Log/lib/Horde/Log/Logger.php
    [line:protected] =&gt; 120
    [trace:Exception:private] =&gt; Array
        (
            [0] =&gt; Array
                (
                    [file] =&gt; /var/www/html/git/horde/framework/Core/lib/Horde.php
                    [line] =&gt; 68
                    [function] =&gt; log
                    [class] =&gt; Horde_Log_Logger
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                            [0] =&gt; Horde_Registry: retrieved appcache with cache ID horde_registry_appcache|1269942303|e7f88b8f7b9243b2b6f23c766a64bfa8
                            [1] =&gt; DEBUG
                            [2] =&gt; Array
                                (
                                    [trace] =&gt; 2
                                )

                        )

                )

            [1] =&gt; Array
                (
                    [file] =&gt; /var/www/html/git/horde/framework/Core/lib/Horde/Registry.php
                    [line] =&gt; 1472
                    [function] =&gt; logMessage
                    [class] =&gt; Horde
                    [type] =&gt; ::
                    [args] =&gt; Array
                        (
                            [0] =&gt; Horde_Registry: retrieved appcache with cache ID horde_registry_appcache|1269942303|e7f88b8f7b9243b2b6f23c766a64bfa8
                            [1] =&gt; DEBUG
                        )

                )

            [2] =&gt; Array
                (
                    [file] =&gt; /var/www/html/git/horde/framework/Core/lib/Horde/Registry.php
                    [line] =&gt; 427
                    [function] =&gt; _loadCacheVar
                    [class] =&gt; Horde_Registry
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                            [0] =&gt; appcache
                        )

                )

            [3] =&gt; Array
                (
                    [file] =&gt; /var/www/html/git/horde/framework/Core/lib/Horde/Registry.php
                    [line] =&gt; 354
                    [function] =&gt; _loadApplicationsCache
                    [class] =&gt; Horde_Registry
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                            [0] =&gt; 
                        )

                )

            [4] =&gt; Array
                (
                    [file] =&gt; /var/www/html/git/horde/framework/Core/lib/Horde/Registry.php
                    [line] =&gt; 179
                    [function] =&gt; __construct
                    [class] =&gt; Horde_Registry
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                            [0] =&gt; 0
                        )

                )

            [5] =&gt; Array
                (
                    [file] =&gt; /var/www/html/horde/index.php
                    [line] =&gt; 14
                    [function] =&gt; appInit
                    [class] =&gt; Horde_Registry
                    [type] =&gt; ::
                    [args] =&gt; Array
                        (
                            [0] =&gt; horde
                            [1] =&gt; Array
                                (
                                    [authentication] =&gt; none
                                    [nologintasks] =&gt; 1
                                )

                        )

                )

        )

    [previous:Exception:private] =&gt; 
)

&gt; Also, it sounds like a different issue, but just in case, are you up 
&gt; to date with Git? 
Yes 

&gt; There were some recent fixes to logging - 
&gt; especially Bug #8937)...
It could be related, the issue I&#039;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(&#039;No handlers were added&#039;);
         }
 
+		
+		if (is_string($level)) {
+            $level = defined(&#039;Horde_Log::&#039; . $level)
+                ? constant(&#039;Horde_Log::&#039; . $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 &#039;message&#039;



</description> 
   <pubDate>Tue, 30 Mar 2010 13:22:29 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8942#t58344</link> 
  </item> 
   
  <item> 
   <title>&gt; What were the log settings before you added those lines? T</title> 
   <description>&gt; What were the log settings before you added those lines? The 
&gt; &quot;default&quot; config file has logging disabled - is that what you were 
&gt; seeing?

just I case I wasn&#039;t really clear, horde/config contained the default settings :
for f in *.dist; do cp $f `basename $f .dist`; done</description> 
   <pubDate>Tue, 30 Mar 2010 13:26:53 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8942#t58345</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #8942: F</title> 
   <description>Changes have been made in Git for this ticket:

Bug #8942: Fix bad log level error
Need to always use Horde_Core_Log_Logger, even with the null driver,
because priority may need to be converted from a string.

http://git.horde.org/diff.php/framework/Core/lib/Horde/Core/Binder/Logger.php?rt=horde-git&amp;r1=781076bb734afd0ae58969d64b4762458c3ec7c1&amp;r2=6ce76467ca8142d61eb046e76739702dfd9ff2c7</description> 
   <pubDate>Tue, 30 Mar 2010 18:25:23 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8942#t58346</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
