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 how to make log4j print out class name and line number Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "how to make log4j print out class name and line number" Watch "how to make log4j print out class name and line number" New topic
Author

how to make log4j print out class name and line number

Tien Duong Nguyen
Greenhorn

Joined: Oct 22, 2004
Posts: 22
Hi everyone,

I am looking for the way to print out the class name and line number in logging message.

E.g : logger.info ("message "); -> ClassName ( line number ) : message.

Can we do it with log4j

Regards,

Andy.


SCEA (part 1), part 2,3 in progress<br /> <br />SCBCD,SCWCD,SCJP
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42951
    
  72
That's possible. The PatternLayout javadocs have all the details.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to make log4j print out class name and line number