I have a huge ear that uses log4j and there is a single config file that is used to set it up. In this config file there is no mention of certain log files but, additional files apart from those specified in the config file get generated in the logs folder. I've searched for other combinations of (logger|log4j|log).(properties|xml) and haven't found anything promising in all of the jar files included in the ear. How do I track down which is the offending thread/class that is creating these extra files?
A:
Have you tried looking in your app server config? In JBoss, look in %JBOSS_HOME%/server/%INSTANCE_DIR%/conf/jboss-log4j.xml.
sblundy
2008-09-15 17:59:40
definitely not from the appserver configuration as the config file is loaded separately and the logs dir is nowhere near the appservers default log dir
shyam
2008-09-15 18:04:34
A:
Formally SysInternal's, now Microsoft's Process Explorer http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
"Find" menu item -> "Find Handle or DLL..."
Adam Caviness
2008-09-15 18:01:59
Already tried that :( But, when I search from the appserver's java process all files and directories I see are of those of the appserver itself my log directory doesn't figure in those. btw i'm using WAS 6.1. But, I plan to take a deeper look into procexp
shyam
2008-09-15 18:09:01
A:
Try placing a breakpoint in the File class' constructors and the mkdir and createNewFile methods. Generally, code will use the File class to create its files or directories. You should have the Java source code for these classes included with your JVM.
MetroidFan2002
2008-09-15 18:49:00
+3
A:
Add "-Dlog4j.debug" to the command line and there will be extra info in standard output about how it is configured.
James A. N. Stauffer
2008-09-15 19:27:25