Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Log4j not printing file name

Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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:

[ October 15, 2004: Message edited by: Pavan Kumar Panduga ]
Yeast devil! Back to the oven that baked you! And take this tiny ad too:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic