• Post Reply Bookmark Topic Watch Topic
  • New Topic

Log4J not printing line number  RSS feed

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using apache Log4j when I execute my program it doesn't print line numbers for the CustCommJDBC class

The only difference between CustCommJDBC and Letter class is static

Letter : private Logger logger = Logger.getLogger(CLASSNAME);
CustCommJDBC : private static Logger logger = Logger.getLogger(CLASSNAME);

I have changed letter logger to static but it still works fine.

Log file:

10:27:24,424 0 [main] INFO CustCommJDBC:? - Loading JDBC driver - Started
10:27:25,346 922 [main] INFO CustCommJDBC:? - Loaded driver - End
10:27:25,346 922 [main] INFO CustCommJDBC:? - establishing Connection - Started
10:27:26,298 1874 [main] INFO CustCommJDBC:? - established Connection - End
10:27:26,298 1874 [main] INFO Letter:345 - end of init method
10:27:26,314 1890 [main] INFO Letter:101 - EXECUTE LETTER - STARTED
10:27:26,314 1890 [main] INFO Letter:104 - create directories - Started
10:27:26,439 2015 [main] INFO Letter:106 - create directories - End
10:27:26,439 2015 [main] INFO Letter:118 - EXECUTE LETTER - END

Could any one let me know what I am missing :-(
 
sarada bokka
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's Eclipse IDE problem

goto Java Compiler -> add line number attributes

uncheck and apply

again check and apply.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!