• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I configure the Log4j to tell me which method i am accessing in Java

 
Senthil Mahalingam
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I configure the Log4j to tell me which method i am accessing. This will be helpful for to debug through log files.
 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a small 'L' in the pattern-layout. (http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html).
If you need a small example have a look at http://logging.apache.org/log4j/1.2/manual.html
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic