I’ve added log4j to my web app that is hosted in a Tomcat server.
The conversion pattern is : log4j.appender.R.layout.ConversionPattern=%5p %d{dd:MM:yyyy HH:mm} (%C::%L) - %m%n
But there is an issue – when the log message comes from my app’s classes, the logger cannot find the file name and line :
ERROR 25:11:2011 08:43 (com.example.bl.dataaccess.BLAccessManager::?) - Error on writeGroup
Is there a possibility to see a number instead of ‘?’ sign ?
Did you used ant to build the classes?
If so, then add
debug="yes"in target compile and it should fix it.