0

I try to configure logger to write line number but instead of it I have question.

log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p [%t]:%L - %m%n

I figured out that it is not log4j problem but setting of my project. The most probably missing debug information in my compiled artifacts. (Line number not showing?) But how can I set that in IntellijIdea 2019.1?

Paul Verest
  • 60,022
  • 51
  • 208
  • 332
Duxa
  • 55
  • 1
  • 7
  • add `%c` into the conversion pattern and show the result – daggett Jan 21 '20 at 13:42
  • If I add %c then I have the name of logger in log file – Duxa Jan 22 '20 at 02:27
  • sorry i mean `%C` (upper) to have classname where event is comming from – daggett Jan 22 '20 at 07:27
  • then i have ```org.apache.commons.logging.Log$info``` – Duxa Jan 22 '20 at 07:30
  • That's the problem. Log4j couldn't detect correctly where message is coming from. And again - the same problem discussed for logback. I don't know if log4j has similar config. But definitely problem not in project. https://stackoverflow.com/questions/59491564/logback-doesnt-print-method-or-line-number/59504563#59504563 – daggett Jan 22 '20 at 08:22
  • So sad( But where I can find logback.groovy? – Duxa Jan 22 '20 at 09:59
  • it's a first file in answer. and the modified one - at the end – daggett Jan 22 '20 at 12:47

0 Answers0