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/03 17:45:35 UTC

[activemq] branch master updated: [AMQ-7433] Render full stack trace by default but document possible ConversionPattern

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 feb8d3d  [AMQ-7433] Render full stack trace by default but document possible ConversionPattern
feb8d3d is described below

commit feb8d3d07357881f70a86180a982219779c4b02a
Author: jbonofre <jb...@apache.org>
AuthorDate: Tue Mar 3 18:44:53 2020 +0100

    [AMQ-7433] Render full stack trace by default but document possible ConversionPattern
---
 assembly/src/release/conf/log4j.properties | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/assembly/src/release/conf/log4j.properties b/assembly/src/release/conf/log4j.properties
index 13267b3..c4c43af 100644
--- a/assembly/src/release/conf/log4j.properties
+++ b/assembly/src/release/conf/log4j.properties
@@ -49,12 +49,18 @@ log4j.appender.logfile.maxFileSize=1024KB
 log4j.appender.logfile.maxBackupIndex=5
 log4j.appender.logfile.append=true
 log4j.appender.logfile.layout=org.apache.log4j.EnhancedPatternLayout
-log4j.appender.logfile.layout.ConversionPattern=%d | %-5p | %m | %c | %t%n%throwable{short}
+log4j.appender.logfile.layout.ConversionPattern=%d | %-5p | %m | %c | %t%n%throwable{full}
 
-# 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
+# you can control the rendering of exception in the ConversionPattern
+# by default, we display the full stack trace
+# if you want to display short form of the exception, you can use
 #
-# log4j.appender.logfile.layout.ConversionPattern=%d | %-5p | %m | %c | %t%n%throwable{full}
+# log4j.appender.logfile.layout.ConversionPattern=%d | %-5p | %m | %c | %t%n%throwable{short}
+#
+# a classic issue with filebeat/logstash is about multiline exception. The following pattern 
+# allows to work smoothly with filebeat/logstash
+#
+# log4j.appender.logfile.layour.ConversionPattern=%d | %-5p | %m | %c | %t%n%replace(%throwable){\n}{ }
 #
 
 # use some of the following patterns to see MDC logging data
@@ -80,4 +86,4 @@ log4j.appender.audit.maxFileSize=1024KB
 log4j.appender.audit.maxBackupIndex=5
 log4j.appender.audit.append=true
 log4j.appender.audit.layout=org.apache.log4j.PatternLayout
-log4j.appender.audit.layout.ConversionPattern=%-5p | %m | %t%n
\ No newline at end of file
+log4j.appender.audit.layout.ConversionPattern=%-5p | %m | %t%n