log4j not printing the stacktrace for exceptions

后端 未结 8 1690
清酒与你
清酒与你 2020-12-04 13:54

I am using log4j with tomcat. When I log exceptions in my JSPs, servlets:

private Logger _log = Logger.getLogger(this.getClass());
...
try{...} catch (Except         


        
8条回答
  •  一整个雨季
    2020-12-04 14:27

    I don't see anything wrong with your config, so try to upgrade log4j to a newer (not necessarily the latest) version.

    Though not the problem in this case, you'd better make your loggers private static final

提交回复
热议问题