You can have multiple applications write to the same log file if you use file locking, otherwise your log file is likely to get corrupted. The RollingFileAppender does not support file locking as it is not possible, or at least very difficult, to have multiple applications try to safely roll the files.
Ralph > On Aug 10, 2018, at 3:29 AM, Rajvinder Pal <rajvinder....@gmail.com> wrote: > > Hi, > > Can multiple web applications write to same log file using log4j2 ? Should > i create separate log file for each web application? > > Thanks, > Raj --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org