You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (Jira)" <ji...@apache.org> on 2020/06/01 15:27:00 UTC

[jira] [Commented] (LOG4J2-2861) Time taken by Log4j2 to rollover a file of size 2GB

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

Ralph Goers commented on LOG4J2-2861:
-------------------------------------

The answer is "It depends".  Normally, Log4j tries to do a file rename. If that works the file size doesn't matter as the contents of the file aren't touched. But if the rename fails then the appender may have to resort to copying the file and then deleting the original. Obviously, that is very much related to the size of the file. If compression is requested that will always be related to the size of the file, but that operation is performed asynchronously so should not impact the application.

> Time taken by Log4j2 to rollover a file of size 2GB
> ---------------------------------------------------
>
>                 Key: LOG4J2-2861
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2861
>             Project: Log4j 2
>          Issue Type: Question
>          Components: Appenders
>    Affects Versions: 2.12.1
>            Reporter: Prateek Sethi
>            Priority: Critical
>             Fix For: 2.12.1
>
>
> Hi There,
>  
> Just want to know the time taken by Log4j2 to rollover a file of size say 2GB.
> Is the time taken depends on size of the file rolled over?
> In the log4j configuration , both the time and size based rollover policy is implemented.
>  
> Regards
> Prateek Sethi



--
This message was sent by Atlassian Jira
(v8.3.4#803005)