[ https://issues.apache.org/jira/browse/LOG4J2-1235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15304008#comment-15304008 ]
ASF GitHub Bot commented on LOG4J2-1235: ---------------------------------------- GitHub user frendos opened a pull request: https://github.com/apache/logging-log4j2/pull/30 LOG4J2-1235 - org.apache.logging.log4j.core.appender.routing.IdlePurgePolicy not working correctly Made a change according to all provided comments in the ticket You can merge this pull request into a Git repository by running: $ git pull https://github.com/frendos/logging-log4j2 LOG4J2-1235 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/logging-log4j2/pull/30.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #30 ---- commit 3a5adba669c937e83c8bc1e5aa0954619d6f8621 Author: Aleksey Zvolinsky <alek...@zvolinsky.name> Date: 2015-11-02T06:28:10Z LOG4J2-649: Purging dynamically created routing sub-appenders 1. Added PurgePolicy interface 2. Added IdlePurgePolicy which is purging sub-appenders that were not in use last X minutes 3. Added ability to access sub-appenders, so custom purging controlled outside log4j2 also possible. commit 4c4f1ab93c3a0ad69a0184e38a2e61fd8c57a3a5 Author: Aleksey Zvolinsky <alek...@zvolinsky.name> Date: 2016-03-12T09:45:59Z Merge branch 'master' of https://github.com/frendos/logging-log4j2 commit 97d781aca93502d422c3e0174770bf5b56779007 Author: Aleksey Zvolinsky <alek...@zvolinsky.name> Date: 2016-05-26T22:47:18Z Merge remote-tracking branch 'apache/master' commit 712d5aa551b68762a0cdc69ea0a92030d49e1ebc Author: Aleksey Zvolinsky <alek...@zvolinsky.name> Date: 2016-05-27T12:29:37Z LOG4J2-1235 - org.apache.logging.log4j.core.appender.routing.IdlePurgePolicy not working correctly 1. Removed issue with NPE when tries to delete already deleted appender 2. Added parameter checkInterval for cases when all appenders already purged, so scheduler will keep working with this interval 3. Fixed an issue when appender purged even if received new event to it during purge procedure ---- > org.apache.logging.log4j.core.appender.routing.IdlePurgePolicy not working > correctly > ------------------------------------------------------------------------------------ > > Key: LOG4J2-1235 > URL: https://issues.apache.org/jira/browse/LOG4J2-1235 > Project: Log4j 2 > Issue Type: Bug > Components: Appenders > Affects Versions: 2.5 > Reporter: Niranjan Rao > Priority: Critical > > There is a problem in the function > org.apache.logging.log4j.core.appender.routing.IdlePurgePolicy.scheduleNext(). > I got out of file handles errors despite of setting IdlePurgePolicy. I did > some digging I believe following is the cause > If the createTime is Long.MAX_VALUE, task is never scheduled. However > function > org.apache.logging.log4j.core.appender.routing.IdlePurgePolicy.update(String, > LogEvent) checks if the future is not null before deciding to schedule. > After appendersUsage becomes empty first time, appenders keep piling up. > I believe fix will be to set future to null in the function scheduleNext in > the else part of the condition where it checks for createTime -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org