On Jan 29, 2007, at 5:08 PM, Eqbal wrote:

Hi,

I am fairly new to log4j. I am experiencing a problem
when configuring log4j in Tomcat and use it through
commons logging framework. I get a ? (question mark)
in place of %F and %L patterns. When I run a Java
class file as a standalone using "main", I get the
proper file name and line number. But when I run the
web application I get a question mark in the console.
Anyone can tell me what I am doing wrong?

Thanks.


That behavior is expected when the calling class is compiled without debug information (like using javac -g:none). Commons logging may complicate issues since it would be responsible to pass a fully qualified category (aka logger) name to log4j otherwise all logging requests will appear to originate from just a few lines in commons logging. I'd expect that the problem is likely a compilation problem, a commons logging problem, or a tomcat problem in that order and unlikely to be a log4j problem.

If that doesn't resolve the problem, I would suggest asking on the Tomcat list and specifying what platform and the versions of JDK, Tomcat, Commons Logging, and log4j are in use.





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to