-
1. Re: Log4JLogger doesn't print right source line
gavin.king Jul 3, 2006 8:52 PM (in response to robjellinghaus)Hmmmmm. I'm not quite sure what is going wrong there either....
-
2. Re: Log4JLogger doesn't print right source line
gavin.king Jul 3, 2006 9:13 PM (in response to robjellinghaus)OK, the problem is that stuff like %F, %L, %M don't work when using a logging wrapper like commons-logging or seam logging, since log4j inspects the stack frames to discover that stuff.
Anyway, we shouldn't be using that stuff, we should be using %c, so I changed the log4j.xml files in CVS. -
3. Re: Log4JLogger doesn't print right source line
starksm64 Jul 3, 2006 10:02 PM (in response to robjellinghaus)See the following issue which was fixed with a new commons logging patch.
http://jira.jboss.com/jira/browse/JBAS-3347 -
4. Re: Log4JLogger doesn't print right source line
gavin.king Jul 3, 2006 10:07 PM (in response to robjellinghaus)Scott, is there an easy adjustment I can make to Seam logging (a wrapper around commons-logging) to solve the problem there too?
-
5. Re: Log4JLogger doesn't print right source line
starksm64 Jul 3, 2006 10:22 PM (in response to robjellinghaus)You have to use the "org.apache.commons.logging.impl.Log4JLogger" name as the callerFQCN in the calls to the log(String callerFQCN, Priority level, Object message, Throwable t) in order for the stack walking logic to find the caler.
http://fisheye.jboss.org/viewrep/~raw,r=1.2.2.1/JBoss/apache/commons-logging/src/java/org/apache/commons/logging/impl/Log4jProxy.java