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 "Justin Cherniak (Created) (JIRA)" <ji...@apache.org> on 2011/10/17 17:28:10 UTC

[jira] [Created] (LOG4PHP-159) LoggerAppenderMail doesn't send out messages if script dies

LoggerAppenderMail doesn't send out messages if script dies
-----------------------------------------------------------

                 Key: LOG4PHP-159
                 URL: https://issues.apache.org/jira/browse/LOG4PHP-159
             Project: Log4php
          Issue Type: Bug
            Reporter: Justin Cherniak


Due to the way it buffers messages until the end of the script, if the PHP script unexpectedly dies, the buffered messages are not sent out since destructors are not called when E_FATAL errors occur.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (LOG4PHP-159) LoggerAppenderMail doesn't send out messages if script dies

Posted by "Ivan Habunek (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LOG4PHP-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13128987#comment-13128987 ] 

Ivan Habunek commented on LOG4PHP-159:
--------------------------------------

Hm, not a bad idea. Maybe it can be applied on the parent LoggerAppender class so it works with all appenders... I will look into it.
                
> LoggerAppenderMail doesn't send out messages if script dies
> -----------------------------------------------------------
>
>                 Key: LOG4PHP-159
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-159
>             Project: Log4php
>          Issue Type: Bug
>            Reporter: Justin Cherniak
>         Attachments: LOG4PHP-159.patch
>
>
> Due to the way it buffers messages until the end of the script, if the PHP script unexpectedly dies, the buffered messages are not sent out since destructors are not called when E_FATAL errors occur.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (LOG4PHP-159) LoggerAppenderMail doesn't send out messages if script dies

Posted by "Justin Cherniak (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4PHP-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Cherniak updated LOG4PHP-159:
------------------------------------

    Attachment: LOG4PHP-159.patch

Proposed patch for the issue.  Calling register_shutdown_function ensures that the appender is closed, even if an E_FATAL error occurs.
                
> LoggerAppenderMail doesn't send out messages if script dies
> -----------------------------------------------------------
>
>                 Key: LOG4PHP-159
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-159
>             Project: Log4php
>          Issue Type: Bug
>            Reporter: Justin Cherniak
>         Attachments: LOG4PHP-159.patch
>
>
> Due to the way it buffers messages until the end of the script, if the PHP script unexpectedly dies, the buffered messages are not sent out since destructors are not called when E_FATAL errors occur.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (LOG4PHP-159) Appenders do not close gracefully if a fatal error occurs

Posted by "Ivan Habunek (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4PHP-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Habunek updated LOG4PHP-159:
---------------------------------

    Description: 
LoggerAppenderMail doesn't send out messages if script dies

Due to the way it buffers messages until the end of the script, if the PHP script unexpectedly dies, the buffered messages are not sent out since destructors are not called when E_FATAL errors occur.

  was:Due to the way it buffers messages until the end of the script, if the PHP script unexpectedly dies, the buffered messages are not sent out since destructors are not called when E_FATAL errors occur.

    
> Appenders do not close gracefully if a fatal error occurs
> ---------------------------------------------------------
>
>                 Key: LOG4PHP-159
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-159
>             Project: Log4php
>          Issue Type: Bug
>            Reporter: Justin Cherniak
>         Attachments: LOG4PHP-159.patch
>
>
> LoggerAppenderMail doesn't send out messages if script dies
> Due to the way it buffers messages until the end of the script, if the PHP script unexpectedly dies, the buffered messages are not sent out since destructors are not called when E_FATAL errors occur.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (LOG4PHP-159) Appenders do not close gracefully if a fatal error occurs

Posted by "Ivan Habunek (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4PHP-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Habunek resolved LOG4PHP-159.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2
         Assignee: Ivan Habunek

It's done. I have implemented your fix in the LoggerAppender constructor so it will be applied to all appenders. Also removed the destructor so that close() is not called twice.
                
> Appenders do not close gracefully if a fatal error occurs
> ---------------------------------------------------------
>
>                 Key: LOG4PHP-159
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-159
>             Project: Log4php
>          Issue Type: Bug
>            Reporter: Justin Cherniak
>            Assignee: Ivan Habunek
>             Fix For: 2.2
>
>         Attachments: LOG4PHP-159.patch
>
>
> LoggerAppenderMail doesn't send out messages if script dies
> Due to the way it buffers messages until the end of the script, if the PHP script unexpectedly dies, the buffered messages are not sent out since destructors are not called when E_FATAL errors occur.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (LOG4PHP-159) Appenders do not close gracefully if a fatal error occurs

Posted by "Ivan Habunek (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4PHP-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Habunek updated LOG4PHP-159:
---------------------------------

    Summary: Appenders do not close gracefully if a fatal error occurs  (was: LoggerAppenderMail doesn't send out messages if script dies)
    
> Appenders do not close gracefully if a fatal error occurs
> ---------------------------------------------------------
>
>                 Key: LOG4PHP-159
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-159
>             Project: Log4php
>          Issue Type: Bug
>            Reporter: Justin Cherniak
>         Attachments: LOG4PHP-159.patch
>
>
> Due to the way it buffers messages until the end of the script, if the PHP script unexpectedly dies, the buffered messages are not sent out since destructors are not called when E_FATAL errors occur.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira