Log4j not printing complete stack trace

孤人 提交于 2019-12-06 12:13:05

This is because of your conversion pattern

 log4j.appender.file.layout.ConversionPattern=%d %5p [%t] (%F:%L) - %m%n %throwable{short}

Here is excerpt from ThrowableInformationPatternConverter

Outputs the ThrowableInformation portion of the LoggingEvent. By default, outputs the full stack trace.

%throwable{none} or %throwable{0} suppresses the stack trace.

%throwable{short} or %throwable{1} outputs just the first line.

%throwable{n} will output n lines for a positive integer or drop the last -n lines for a negative integer.

You need to remove %throwable{short} to see full stack trace

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!