3 messages in org.apache.logging.log4j-userRunning the same package in different...
FromSent OnAttachments
Vernier, Dominique (DVernier)Jun 3, 2004 9:55 pm 
Vernier, Dominique (DVernier)Jun 3, 2004 10:10 pm 
mrut...@westpac.com.auJun 3, 2004 11:50 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Running the same package in different JVM with the same log4j configurationActions...
From:Vernier, Dominique (DVernier) (dver@relaystar.com)
Date:Jun 3, 2004 10:10:27 pm
List:org.apache.logging.log4j-user

Forget to say that the System property name used to postfix the file is defined in the log4j configuration file. This System property can be also used to give the full file name and use the File parameter to define the only the directory location or a part of it. ------------------------------------------------------------------------ ------------------------------------------------------------------------ --------

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