You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Sr...@aaita.com on 2003/10/29 16:28:40 UTC

File name and Line number problem

Hi,

I am trying to implement log4j across the entire project, there are about
1000 files in the project.

What I have done is to have a utility class Log4j.java and thru my startup
program initialize
all the default log4j properties. (loggers,appender etc.) from the
specified property file
All of the other programs just invoke the method
com.abc.util.Log4j.log("some string") method.

Everything works great up and all messages get trapped to the specified
appender except
for this one issue.

The file and line number I specify correspond to the utility class and not
the actual class that is printing this message.
when I use the conversion pattern (%F:%L)

E.g. If there is this class - Example.class and at line#35
there is a statment com.abc.util.Log4j.log("Test message");

The file name printed on the log file corresponds to the Log4j.java and the
line number corresponds
to the log method in that file.

Best regards,
Sre




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org