#751: stdout/stderror log appenders are broken
---------------------------------------+------------------------------------
 Reporter:  MikeSeth                   |        Owner:  dominik
     Type:  defect                     |       Status:  new    
 Priority:  low                        |    Milestone:  0.11.1 
Component:  logging                    |      Version:  0.11.0 
 Severity:  minor                      |   Resolution:         
 Keywords:  stderr stdout logging bug  |    Has_patch:  0      
---------------------------------------+------------------------------------
Changes (by david):

  * owner:  david => dominik
  * component:  _OTHER_ => logging
  * severity:  trivial => minor

Old description:

> Trying to use stdout/stderror log appenders which rely on the
> ``php://foo'' naming convention for PHP streams results in:
>
> Fatal error: Uncaught exception 'AgaviLoggingException' with message
> 'Cannot open file "php://stderr", please check permissions on file or
> directory.' in
> /usr/share/php/agavi/logging/AgaviFileLoggerAppender.class.php:75
>
> Stack trace:
>
> #0 /usr/share/php/agavi/logging/AgaviFileLoggerAppender.class.php(115):
> AgaviFileLoggerAppender->getHandle()
>
> #1 /usr/share/php/agavi/logging/AgaviLogger.class.php(58):
> AgaviFileLoggerAppender->write(Object(AgaviLoggerMessage))
>
> <.. application stack frame ..>
>
> This is because in AgaviFileLoggerAppender's getHandle() no consideration
> is made towards the streams as the code asserts the file name passed to
> it is a physical file.

New description:

 Trying to use stdout/stderror log appenders which rely on the
 {{{php://foo}}} naming convention for PHP streams results in:

 {{{
 Fatal error: Uncaught exception 'AgaviLoggingException' with message
 'Cannot open file "php://stderr", please check permissions on file or
 directory.' in
 /usr/share/php/agavi/logging/AgaviFileLoggerAppender.class.php:75
 }}}

 Stack trace:
 {{{
 #0 /usr/share/php/agavi/logging/AgaviFileLoggerAppender.class.php(115):
 AgaviFileLoggerAppender->getHandle()

 #1 /usr/share/php/agavi/logging/AgaviLogger.class.php(58):
 AgaviFileLoggerAppender->write(Object(AgaviLoggerMessage))
 }}}

 This is because in {{{AgaviFileLoggerAppender}}}'s {{{getHandle()}}} no
 consideration is made towards the streams as the code asserts the file
 name passed to it is a physical file.

-- 
Ticket URL: <http://trac.agavi.org/ticket/751#comment:1>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5


_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets

Reply via email to