don't fail silently. move check for firephp-lib to activeOptions method
authorFlorian Semm <floriansemm@apache.org>
Mon, 26 Mar 2012 05:24:26 +0000 (05:24 +0000)
committerFlorian Semm <floriansemm@apache.org>
Mon, 26 Mar 2012 05:24:26 +0000 (05:24 +0000)
git-svn-id: https://svn.apache.org/repos/asf/logging/log4php/trunk@1305227 13f79535-47bb-0310-9956-ffa450edef68

src/main/php/appenders/LoggerAppenderFirephp.php

index afb6346..e03f422 100644 (file)
@@ -66,7 +66,12 @@ class LoggerAppenderFirephp extends LoggerAppender {
         * @return void
         */
        public function activateOptions() {
-               $this->closed = false;
+               $console = $this->getConsole();\r
+               if (null === $console) {\r
+                       $this->warn('FirePHP is not installed correctly.');\r
+               }               
+               
+               $this->closed = true;
        }
 
        /**
@@ -77,11 +82,6 @@ class LoggerAppenderFirephp extends LoggerAppender {
         * @return void
         */
        public function append(LoggerLoggingEvent $event) {
-               $console = $this->getConsole();
-               if (null === $console) {
-                       $this->warn('FirePHP is not installed correctly.');
-               }
-
                $msg = $this->getLayout()->format($event);
                
                switch ($this->getLogLevel($event)) {