From c9902433c7f3daef6c7b751d08f9de608ee345f2 Mon Sep 17 00:00:00 2001 From: jbonofre Date: Sun, 1 Mar 2020 17:38:00 +0100 Subject: [PATCH] [AMQ-7433] Use short rendering of exception instead of full stack trace to avoid to pollute log file --- assembly/src/release/conf/log4j.properties | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/assembly/src/release/conf/log4j.properties b/assembly/src/release/conf/log4j.properties index ee3679879d..13267b3ba2 100644 --- a/assembly/src/release/conf/log4j.properties +++ b/assembly/src/release/conf/log4j.properties @@ -48,8 +48,15 @@ log4j.appender.logfile.file=${activemq.data}/activemq.log log4j.appender.logfile.maxFileSize=1024KB log4j.appender.logfile.maxBackupIndex=5 log4j.appender.logfile.append=true -log4j.appender.logfile.layout=org.apache.log4j.PatternLayout -log4j.appender.logfile.layout.ConversionPattern=%d | %-5p | %m | %c | %t%n +log4j.appender.logfile.layout=org.apache.log4j.EnhancedPatternLayout +log4j.appender.logfile.layout.ConversionPattern=%d | %-5p | %m | %c | %t%n%throwable{short} + +# now, by default, we only render exceptions in short (first line) to avoid to pollute log file +# if you want to render the full exception stack trace, you can use the following pattern +# +# log4j.appender.logfile.layout.ConversionPattern=%d | %-5p | %m | %c | %t%n%throwable{full} +# + # use some of the following patterns to see MDC logging data # # %X{activemq.broker}