I tried searching the mailing list but did not find a solution to the following issue
I face which causes my code to crash:
a) If the filename specified in args[0] does not exist
b) If there are syntax errors in the contents of the Configuration files specified by
args[0]
Any help/pointers
Try setting the System property log4j.debug to true; typically this is
done using -Dlog4j.debug=true. The other option would be to slightly alter
the main as follows:
public static void main( String[] args )
{
System.setProperty( log4j.debug, true );
try
{
I have deployed an application as an ear file to Weblogic. The war file
within the ear file contains the log4j.properties file in the
WEB-INF/classes directory, and the log4j.jar in the WEB-INF/lib directory.
My understanding is that log4j should pick up the log4j.properties file from
the
Is that directory on the classpath somewhere higher than the weblogic app
classloader? For example is it on the system classpath or server classpath?
Where is the class which triggers log4j initialization? Is it contain
within the war file? If, for example, and ejb component is the first to
The directory was in the system classpath. I took it out, and now I get a
No appenders could be found for category (root). message. Does this mean
its not finding the properties file?
To answer the other questions, this is a Struts application, and I'm in an
Action class in the war file. I
Does this mean its not finding the properties file?
Yes
So the file is named log4j.properties or log4j.xml and is located in the
war's WEB-INF/classes directory? That's strange, it should find it.
Have you tried with log4j.debug set to true?
You can try placing log4j.jar and the config file
Paul,
Thanks for the response. Let me repeat back to you what I think
you are saying to be sure I understand.
Basically you are using MDC (I don't think NDC would be quite
right, and not sure what Properties are in this context) to add a
user-specified attribute to each