aspose file tools
The moose likes Other Open Source Projects and the fly likes is it possible to set the log4j log file location using web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "is it possible to set the log4j log file location using web.xml" Watch "is it possible to set the log4j log file location using web.xml" New topic
Author

is it possible to set the log4j log file location using web.xml

peter tong
Ranch Hand

Joined: Mar 15, 2008
Posts: 234
as caption, in presence, the log file location is set in log4j.properties, log4j.appender.A2.File={path}
is it possible to change set the log file location using web.xml?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26168
    
  66

The short answer is yes.

Search for "initialization servlet" on the manual page. This doesn't show exactly what you want. But you could configure anything you want this way. You could even write out a property file at runtime based completely on information in your web.xml.

Why do you want to though? A property file is more external/easier to change than the web.xml which is part of the app.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: is it possible to set the log4j log file location using web.xml
 
Similar Threads
web.xml
tag libs with weblogic6.1
Setting Common folder for all clusters in websphere and displaying files from that folder in page
JSP cannot call Servlet
Starting Sonar at 9000 port