Hi,
I am facing issues with logging of 2 applications deployed in same JVM.
I have 2 applications say A & B running in Websphere application server.
A is EJB project having log4j.jar in EJB jar
B is also EJB project but doesn't have log4j.jar as part of EJB jar and it refers to log4j jar available in Websphere lib.
A & B have independent Logger classes say ALogger.java and BLogger.java resp.
ALogger.java having static Logger logger = Logger.getLogger("A.class)");
BLogger.java having static Logger logger = Logger.getLogger("B.class)");
log4j.properties fot both are different and logs are written to diff file
App A:
log4j.rootLogger=ALL,ErrorAppender,file
log4j.appender.ErrorAppender.Threshold=WARN log4j.appender.ErrorAppender.layout.ConversionPattern=%-5p\t%d{ddMMyyyy-HH\:mm\:ss}\t%m%n log4j.appender.ErrorAppender.DatePattern='.'yyyy-MM-dd log4j.appender.ErrorAppender.layout=org.apache.log4j.PatternLayout log4j.appender.ErrorAppender.File=AErrorLog.log log4j.appender.ErrorAppender=org.apache.log4j.RollingFileAppender log4j.appender.ErrorAppender.MaxFileSize=1MB log4j.appender.ErrorAppender.MaxBackupIndex=5
log4j.appender.file.Threshold=DEBUG log4j.appender.file.layout.ConversionPattern=%-5p\t%d{ddMMyyyy-HH\:mm\:ss}\t%m%n log4j.appender.file.DatePattern='.'yyyy-MM-dd log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.File=ALog.log log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file.MaxFileSize=1MB log4j.appender.file.MaxBackupIndex=5
App B:
log4j.rootLogger=ALL,ErrorAppender,file
log4j.appender.ErrorAppender.Threshold=WARN log4j.appender.ErrorAppender.layout.ConversionPattern=%-5p\t%d{ddMMyyyy-HH\:mm\:ss}\t%m%n log4j.appender.ErrorAppender.DatePattern='.'yyyy-MM-dd log4j.appender.ErrorAppender.layout=org.apache.log4j.PatternLayout log4j.appender.ErrorAppender.File=BErrorLog.log log4j.appender.ErrorAppender=org.apache.log4j.RollingFileAppender log4j.appender.ErrorAppender.MaxFileSize=1MB log4j.appender.ErrorAppender.MaxBackupIndex=5
log4j.appender.file.Threshold=DEBUG log4j.appender.file.layout.ConversionPattern=%-5p\t%d{ddMMyyyy-HH\:mm\:ss}\t%m%n log4j.appender.file.DatePattern='.'yyyy-MM-dd log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.File=BLog.log log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file.MaxFileSize=1MB log4j.appender.file.MaxBackupIndex=5
log4j works fine when B is invoked after processing of A.
Problem : While A is running if B gets triggered,App A logs are getting written to App B's log file.How to fix this issue?
I have tried changing appender names for App B but it didn't work. This is urgent and any help regarding this problem is appreciated.