Hi log4j gurus,
 
I have a cluster of 4 Application Servers running on the same phisical server and logging to the same file.
 
I want that each app server  that have the same app code installed log on a different logging file but as the log4j.properties is the same for all apps, we are logging on the same file.
 
We are using RollingFileAppender as you can see and we have "hardcode" the fileĀ“s name and location.
 
   <appender name="rolling" class="org.apache.log4j.RollingFileAppender">
        <param name="File" value="../../../../pgcd_intranet.log"/>
        <param name="MaxFileSize" value="10MB"/>
        <param name="MaxBackupIndex" value="7"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{yy-MM-dd,HH:mm:ss,SSS} %-5p (%c{1}:%L) >> %m%n"/>
        </layout>
    </appender>
 
Questions:
 
1) How works log4j in this context ( 4 AS logging to the same file) I mean "deadlock", "problems with sync", etc.
2) How can I do to use one diferent logging file for each AS without changing application code ?
3) How can I do to use env variables inside log4j.properties?
 
 
 
Thank in advance
 
Hector