log file not generated while accessing a jar having log4j support.

Posted by naveen garimella on Stack Overflow See other posts from Stack Overflow or by naveen garimella
Published on 2010-05-23T20:56:14Z Indexed on 2010/05/23 21:00 UTC
Read the original article Hit count: 161

Filed under:
|

I have a x.jar which is being used by some client y.jar. Both x.jar and y.jar are at the same package level. i have put the log4j.xml at the same package level.

But the log file is never generated. Can i know why?

I have tried few other options as well but no luck till now.

  1. i have added log4j-1.2.16.jar to ClassPath: variable in manifest files of both x.jar and y.jar.
  2. Put log4j.xml at the class level of y.jar which actually calls the x.jar classes.

package structure is as follows:

x.jar
--manifest.mf has a entry ClassPath:log4j-1.2.16.jar
y.jar
--manifest.mf has a entry ClassPath:log4j-1.2.16.jar
log4j-1.2.16.jar
log4j.xml
--has a RollingFileAppender.

Can any one suggest whether i am missing anything?

© Stack Overflow or respective owner

Related posts about java

Related posts about log4j