LoggerAppenderConsole doesn't write to STDERR
---------------------------------------------

                 Key: LOG4PHP-28
                 URL: https://issues.apache.org/jira/browse/LOG4PHP-28
             Project: Log4php
          Issue Type: Bug
          Components: Code
            Reporter: Michael Kuenzli


How to reproduce:
1. Take the console example from apache-log4php/trunk/src/examples/php/ 
and change the following line in console.properties
log4php.appender.console.target = STDOUT
to
log4php.appender.console.target = STDERR

2. Run console.php.
-> Effect: no output to STDERR

Solution:
Index: trunk/src/main/php/appenders/LoggerAppenderConsole.php
===================================================================
--- trunk/src/main/php/appenders/LoggerAppenderConsole.php      (revision 
769273)
+++ trunk/src/main/php/appenders/LoggerAppenderConsole.php      (working copy)
@@ -76,7 +76,7 @@
         if ($v == self::STDOUT || strtoupper($v) == 'STDOUT') {
             $this->target = self::STDOUT;
         } elseif ($v == self::STDERR || strtoupper($v) == 'STDERR') {
-            $target = self::STDERR;
+            $this->target = self::STDERR;
         } else {
             LoggerLog::debug("Invalid target. Using '".self::STDOUT."' by 
default.");        
         }


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to