[ 
https://issues.apache.org/jira/browse/LOG4PHP-120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13451299#comment-13451299
 ] 

Ivan Habunek commented on LOG4PHP-120:
--------------------------------------

Thanks for the contribution.

I have made a some modifications to your approach:
* Using the event's timestmap instead of fetching current datetime. This seems 
more logical, and makes testing easier.
* Removed call to close() because this closes the appender permanently. 
Replaced it with just closing the file handle.

I have also updated the unit tests, still need to update docs.

Please have a look at the new code and test it.

BTW, for an easy test scenario, set the datePattern to 'Y.m.d.H.i.s'. It will 
rollover each second. :)

                
> LoggerAppenderDailyFile doesn't roll over file inside of a process
> ------------------------------------------------------------------
>
>                 Key: LOG4PHP-120
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-120
>             Project: Log4php
>          Issue Type: Bug
>          Components: Code
>    Affects Versions: 2.0.0
>         Environment: Linux
>            Reporter: Christopher Merrick
>         Attachments: patch.php
>
>
> In a long-running CLI process, LoggerAppenderDailyFile doesn't roll over to a 
> new file when midnight is passed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to