You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Vernier, Dominique (DVernier)" <dv...@relaystar.com> on 2004/06/04 06:56:09 UTC
Running the same package in different JVM with the same log4j
configuration
Hi,
I running one the same server multiple JVM machine which are running the
same java package. The log4j configuration file location is in a
property file in my logger framework package which is also running in
each JVM of course. I using a FileAppender to as log trace.
As a File can't be open twice, only one JVM can't write into the file.
The problem also occurred for all Appender which extend the
FileAppender.
As work around I wrote a new FileAppender which use a System property to
post fix the file name. So, I can launch different JVM with different
System property and then avoid the concurency problem on a non-sharable
ressource.
I would be nice to have this feature in a future release or have a way
or it already exists a way (which I ignore) to avoid this problem.
Regards
Dominique