You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Lukasz Wielek (JIRA)" <ji...@apache.org> on 2010/09/16 15:26:34 UTC
[jira] Commented: (LOG4J2-43) Allow DailyRollingFile appender to
rollover programmatically
[ https://issues.apache.org/jira/browse/LOG4J2-43?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910148#action_12910148 ]
Lukasz Wielek commented on LOG4J2-43:
-------------------------------------
Looks like making rollOver public will not be sufficient.
I think it is required to add forceRollOver method which will include code similar to subAppend method:
public void forceRollOver()
{
long n = System.currentTimeMillis();
if (n >= nextCheck)
{
now.setTime(n);
nextCheck = rc.getNextCheckMillis(now);
try
{
rollOver();
} catch (IOException ioe)
{
LogLog.error("rollOver() failed.", ioe);
}
}
}
> Allow DailyRollingFile appender to rollover programmatically
> -------------------------------------------------------------
>
> Key: LOG4J2-43
> URL: https://issues.apache.org/jira/browse/LOG4J2-43
> Project: Log4j 2
> Issue Type: New Feature
> Components: Appenders
> Reporter: Lukasz Wielek
> Priority: Minor
>
> Allow DailyRollingFile appender to rollover programmatically without appending any new log event.
> This will allow log file rollover, in case there's no messages to be logged for a long time,
> but the current log file needs to be backed up.
> I think making the rollOver method public would be sufficient :)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org