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

Ralph Goers commented on LOG4J2-1828:
-------------------------------------

Look at FileManager.write(). You will see it acquire the file lock while it is 
writing. The RollingFileManager has to do the same thing but the isLocking 
variable can only be set when the Appender is configured so that it won't cause 
problems - i.e. only if a DirectFileRolloverStrategy is used and if no async 
actions are configured.

> add support for prudent mode in Log4j 2
> ---------------------------------------
>
>                 Key: LOG4J2-1828
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1828
>             Project: Log4j 2
>          Issue Type: Improvement
>            Reporter: Erik Weathers
>            Priority: Minor
>
> As discussed in LOG4J2-174, there is a feature from logback called ["prudent 
> mode"|https://logback.qos.ch/manual/appenders.html#prudent] which is not 
> available in Log4j 2.  This feature allows multiple JVMs to write to the same 
> log file at the same time, albeit with a [few 
> restrictions|https://logback.qos.ch/manual/appenders.html#prudentWithRolling].
> Please see LOG4J2-174 for a discussion on some alternative approaches you 
> might consider if you want prudent mode but this ticket isn't yet fixed in 
> the version of Log4j 2 you are using.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to