I’ve got a tomcat6 server with about 70 web apps running on it, and I’ve got one (or more) that has set a shared .jar to log in debug mode and this is eating up my disks.
I’ve tried using lsof on the file, but it just tells me that it is the tomcat user and the java program that is writing to the file (which I already knew).
I’ve spent some time on Google, but must be using the wrong search terms as all I got was info on how Tomcat itself logs or how to write the code needed to do logging or file writing from within the webapp.
The logfile doesn’t have the info I need to be able to tell which webapp is calling it, only info related to the jar that is actually doing the writing.
Can someone please either point me to some information on how to find out which webapp is causing the problem or tell me how to determine this?
If multiple web applications are writing to the same file there is no easy way to unpick that. You’ll need to re-configure each web application’s logging to log to a separate file rather than the same file. I assume that this logging is being done through a framework such as log4j. You’ll need to modify the configuration in an appropriate manner for the framework being used.
Alternatively, check the logging configuration files to see which one is configured for debug and change it.
As a third – far from ideal option – use the manager application to perform a binary search as you stop web applications to determine which one is filling your log files.