File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Log4j Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Log4j " Watch "Log4j " New topic
Author

Log4j

abhishek khandelwal
Greenhorn

Joined: Apr 17, 2007
Posts: 11
Hi Guys,

I seek your valuable help with regards to the implementation of Log4j in my application.

We have two different web applications deployed on single websphere application server cluster.
both have different log4j.properties file.

Here are their listing:

Property File for application 1
---------------------------------------------
log4j.rootLogger=DEBUG, ROOT

log4j.appender.ROOT=org.apache.log4j.RollingFileAppender

log4j.appender.ROOT.File=E:\\X\\ApplicationFramework.log

log4j.appender.ROOT.MaxFileSize=500KB

log4j.appender.ROOT.layout=org.apache.log4j.PatternLayout

log4j.appender.ROOT.MaxBackupIndex=5

log4j.appender.ROOT.layout.ConversionPattern=[%d] %t %c %-5p - %m%n

Property File for application 2
---------------------------------------------
log4j.rootLogger=INFO, HELLO

log4j.appender.HELLO=org.apache.log4j.RollingFileAppender

log4j.appender.HELLO.File=E:\\Y\\Hello.log

log4j.appender.HELLO.MaxFileSize=10MB

log4j.appender.HELLO.layout=org.apache.log4j.PatternLayout

log4j.appender.HELLO.MaxBackupIndex=5

log4j.appender.HELLO.layout.ConversionPattern=[%d] %t %c %-5p - %m%n

Problem: The log statements from Application 1 are being written to the Hello.log file.

Could you help me to figure out the problem?
Thanks in Advance!


Abhishek Khandelwal


Abhishek Khandelwal
SCPJ1.4, SCWCD1.4
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10102
    
165

Did you check which log4j.properties file is being picked up by application1?


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Log4j