You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by Christian Grobmeier <gr...@gmail.com> on 2009/07/28 08:12:53 UTC

Re: [jira] Commented: (LOG4PHP-59) LoggerAppenderConsole is initialized wrong

Hi,

Christian, I tried to do:
protected $fp = self::STDOUT;

like you suggested, but all my testcases fail afterwards. Could have a
look on this again?

This is one of 8 exceptions (all of same kind):

1) testConfigure(LoggerConfiguratorBasicTest)
fclose(): supplied argument is not a valid stream resource
/log4php/src/main/php/appenders/LoggerAppenderConsole.php:83

Cheers,
Christian



On Mon, Jul 27, 2009 at 8:12 AM, Christian Grobmeier
(JIRA)<ji...@apache.org> wrote:
>
>    [ https://issues.apache.org/jira/browse/LOG4PHP-59?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735488#action_12735488 ]
>
> Christian Grobmeier commented on LOG4PHP-59:
> --------------------------------------------
>
> With exactly that patch php errors occur.
> With the use of self::STDOUT testcases fail unfortunatly.
>
> Can you please review this one again? Maybe the patch is incomplete or so.
>
> Thanks much :-)
>
>> LoggerAppenderConsole is initialized wrong
>> ------------------------------------------
>>
>>                 Key: LOG4PHP-59
>>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-59
>>             Project: Log4php
>>          Issue Type: Bug
>>          Components: Code
>>    Affects Versions: 2.2
>>            Reporter: Christian Hammers
>>             Fix For: 2.0
>>
>>
>> Hello
>> Using    define('LOG4PHP_CONFIGURATOR_CLASS', 'LoggerConfiguratorBasic');   is supposed to configure
>> log4php so that it prints on stdout. That currently does not happen as the $fp variable of the LoggerAppenderConsole
>> class is never initialized via the setTarget() method.
>> The LoggerConfiguratorInit does this with e.g. "log4php.appender.console.target = STDOUT" but here, too, I would
>> strongly suggest making stdout the default!
>> bye,
>> -christian-
>> Index: src/main/php/appenders/LoggerAppenderConsole.php
>> ===================================================================
>> --- src/main/php/appenders/LoggerAppenderConsole.php    (Revision 797819)
>> +++ src/main/php/appenders/LoggerAppenderConsole.php    (Arbeitskopie)
>> @@ -51,7 +51,7 @@
>>          * @var mixed the resource used to open stdout/stderr
>>          * @access private
>>          */
>> -       protected $fp = false;
>> +       protected $fp = STDOUT;
>>
>>         /**
>>          * Set console target.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

Re: [jira] Commented: (LOG4PHP-59) LoggerAppenderConsole is initialized wrong

Posted by Christian Hammers <ch...@lathspell.de>.
Hello

Am Tue, 28 Jul 2009 08:12:53 +0200
schrieb Christian Grobmeier <gr...@gmail.com>:

> Hi,
> 
> Christian, I tried to do:
> protected $fp = self::STDOUT;
> 
> like you suggested, but all my testcases fail afterwards. Could have a
> look on this again?

No problems for me:

[INFO] Executing tasks
     [exec] PHPUnit 3.3.17 by Sebastian Bergmann.
     [exec] 
     [exec] .......II.................................................WARN - my message
     [exec] WARN - my message
     [exec] .. 60 / 85
     [exec] WARN - my message
     [exec] .IIIIIIII................
     [exec] 
     [exec] Time: 2 seconds
     [exec] 
            OK, but incomplete or skipped tests!
            Tests: 85, Assertions: 221, Incomplete: 10.

I'm using revision 799092 of http://svn.apache.org/repos/asf/incubator/log4php/trunk

bye,

-christian-

 
> This is one of 8 exceptions (all of same kind):
> 
> 1) testConfigure(LoggerConfiguratorBasicTest)
> fclose(): supplied argument is not a valid stream resource
> /log4php/src/main/php/appenders/LoggerAppenderConsole.php:83
> 
> Cheers,
> Christian
> 
> 
> 
> On Mon, Jul 27, 2009 at 8:12 AM, Christian Grobmeier
> (JIRA)<ji...@apache.org> wrote:
> >
> >    [ https://issues.apache.org/jira/browse/LOG4PHP-59?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735488#action_12735488 ]
> >
> > Christian Grobmeier commented on LOG4PHP-59:
> > --------------------------------------------
> >
> > With exactly that patch php errors occur.
> > With the use of self::STDOUT testcases fail unfortunatly.
> >
> > Can you please review this one again? Maybe the patch is incomplete
> > or so.
> >
> > Thanks much :-)
> >
> >> LoggerAppenderConsole is initialized wrong
> >> ------------------------------------------
> >>
> >>                 Key: LOG4PHP-59
> >>                 URL:
> >> https://issues.apache.org/jira/browse/LOG4PHP-59 Project: Log4php
> >>          Issue Type: Bug
> >>          Components: Code
> >>    Affects Versions: 2.2
> >>            Reporter: Christian Hammers
> >>             Fix For: 2.0
> >>
> >>
> >> Hello
> >> Using    define('LOG4PHP_CONFIGURATOR_CLASS',
> >> 'LoggerConfiguratorBasic');   is supposed to configure log4php so
> >> that it prints on stdout. That currently does not happen as the
> >> $fp variable of the LoggerAppenderConsole class is never
> >> initialized via the setTarget() method. The LoggerConfiguratorInit
> >> does this with e.g. "log4php.appender.console.target = STDOUT" but
> >> here, too, I would strongly suggest making stdout the default!
> >> bye, -christian- Index:
> >> src/main/php/appenders/LoggerAppenderConsole.php
> >> ===================================================================
> >> --- src/main/php/appenders/LoggerAppenderConsole.php    (Revision
> >> 797819) +++ src/main/php/appenders/LoggerAppenderConsole.php
> >>  (Arbeitskopie) @@ -51,7 +51,7 @@
> >>          * @var mixed the resource used to open stdout/stderr
> >>          * @access private
> >>          */
> >> -       protected $fp = false;
> >> +       protected $fp = STDOUT;
> >>
> >>         /**
> >>          * Set console target.
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
> >