You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2020/03/01 17:04:26 UTC

[activemq] branch master updated: [AMQ-7433] Use short rendering of exception instead of full stack trace to avoid to pollute log file

This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/master by this push:
     new c990243  [AMQ-7433] Use short rendering of exception instead of full stack trace to avoid to pollute log file
     new 609766f  Merge pull request #487 from jbonofre/AMQ-7433
c990243 is described below

commit c9902433c7f3daef6c7b751d08f9de608ee345f2
Author: jbonofre <jb...@apache.org>
AuthorDate: Sun Mar 1 17:38:00 2020 +0100

    [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 ee36798..13267b3 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}