wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Custom log folder and log4j Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Custom log folder and log4j" Watch "Custom log folder and log4j" New topic
Author

Custom log folder and log4j

Mike Himstead
Ranch Hand

Joined: Apr 12, 2006
Posts: 178
Hi,

I maintain a web app hosted by a Tomcat 5.0.27 server, the web app uses log4j for logging. Up to now, the path to where the logs are writtem is configured with an absolute path in log4j.properties. For whatever reason the server administrator decided to change the general logging directory from %tomcat%/logs to another directory (I know that one). I'd like to prevent future problems and like to get the server's configured logging directory. Is there a way to ask Tomcat for the path? And are there any strange problems to be expected when configuring log4j programmatically to use a certain directory?
 
jQuery in Action, 2nd edition
 
subject: Custom log folder and log4j
 
Similar Threads
Using log4j in ServletContextListener
Setting up logging
Servlet not receiving any data
Java Logging and concurrent users
FileAppender - who calls close() ?