logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remko Popma <remko.po...@gmail.com>
Subject Re: Different Processes, same Logfile
Date Sat, 25 Jun 2016 14:39:04 GMT
If you configure a FileAppender
<http://logging.apache.org/log4j/2.x/manual/appenders.html#FileAppender>
with the locking option set to true, Log4j will do the rest.

On Sat, Jun 25, 2016 at 10:45 PM, Jochen Wiedmann <jochen.wiedmann@gmail.com
> wrote:

> On Sat, Jun 25, 2016 at 9:01 AM, Ralph Goers <ralph.goers@dslextreme.com>
> wrote:
> > In order for multiple processes to share a log file os file locking has
> to be used, which impacts performance considerably. Furthermore, only a
> regular FileAppender can be used. You really can’t share a rolling file
> safely as both processes may try to roll the file at the same time.
> Furthermore, if one of the processes fails to specify file locking should
> be used then the file will likely get corrupted on some systems.
>
> I'd be quite ready to pay that price, if I had log4j handle the details
> for me.
>
> Jochen
>
>
>
> --
> The next time you hear: "Don't reinvent the wheel!"
>
>
> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message