Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Line number not showing?

Tags:

java

log4j

I have discovered some issues in my program.
I was using log4j for logging,
however, inside the log file, all line number become "?".

The conversation pattern is as follow:

log4j.appender.file.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss,SSS} %5p %c: %L - %m%n
like image 655
Hei Avatar asked Mar 30 '12 05:03

Hei


2 Answers

You are most probably missing debug information in your compiled artifacts. I.e. it is not log4j's fault, you need to make sure you are compiling your stuff with debug information included. A quick test would be to try and debug your app with your favourite IDE. If there is no debug info it will complain and won't establish debug session...

like image 87
Svilen Avatar answered Oct 16 '22 09:10

Svilen


Set the options debug="true" debuglevel="lines,source" in your javac ant-task.

like image 4
quaylar Avatar answered Oct 16 '22 09:10

quaylar