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 configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "log4j configuration" Watch "log4j configuration" New topic
Author

log4j configuration

Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
hi,

i have a jar file which i need to deploy in a web app. the web app (3rd party) already have log4 configuration. can i have log4j.properties in my jar and save the logs in different directory ? since the jar is in the web app, im a little confused about which log file it is going to fetch.. appreciate any help !!

thanks,
rajeev


SCJP, SCWCD, SCBCD, Oracle Certified Professional (SQL n PL/SQL)
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

Your question is not clear. Presumably if the web-app is already using log4j then it already has a configuration file.

You say you have to deploy a jar file in this web-app. I don't know what that means. Perhaps you're including some extra functionality or something. But whatever it means, if code from that jar file is going to be executed, and if it wants to use log4j, then it's going to use the configuration file which is already there. Only one configuration file will be used -- I suppose that was the main point of your question, wasn't it?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: log4j configuration
 
Similar Threads
Can you write to config files in jar files?
Can we edit Tomcat default home page?
Tomcat webapp
Problem with shared access to Log4j in Tomcat
Confused (JWS)