File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Log4j not printing file name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Log4j not printing file name" Watch "Log4j not printing file name" New topic
Author

Log4j not printing file name

Lalan Sarang
Greenhorn

Joined: Jul 14, 2004
Posts: 9
Hi guys,
I am using log4j for logging. I am facing a weird issue. I compile and build my jar file for project using Eclipse. My log works perfectly fine. I get file name and line number in the output. I use this layout org.apache.log4j.PatternLayout. And here is the pattern I use.



When I try to build the project jar file using Ant and upon execution I do not get the file name and line number. Instead I get (?:?). I am lost finding out the reason. Really appreciate any insights.

Thanks,
A.
Pavan Panduga
Ranch Hand

Joined: Jun 12, 2002
Posts: 68
Lalan,

I did give it a try both in a jar and normally, and it did print the filename and line number.

here's my configuration file, if that helps in any way
and the output:


Regards,
[ October 15, 2004: Message edited by: Pavan Kumar Panduga ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Log4j not printing file name
 
Similar Threads
Questions about DVCS
Executable JAR File Problem
Logging in a jar
log4j not printing filename and line number in log file
Third party libraries and WSAD 5.1.0