From 8aa788fb147214654c134debb504d9c8d93a9191 Mon Sep 17 00:00:00 2001 From: jmehrens Date: Tue, 31 Oct 2023 23:11:09 -0500 Subject: [PATCH] Remove classnames from rendered messages Signed-off-by: jmehrens --- .../eclipse/angus/mail/util/logging/CompactFormatter.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mailhandler/src/main/java/org/eclipse/angus/mail/util/logging/CompactFormatter.java b/mailhandler/src/main/java/org/eclipse/angus/mail/util/logging/CompactFormatter.java index 534c617..0863bda 100644 --- a/mailhandler/src/main/java/org/eclipse/angus/mail/util/logging/CompactFormatter.java +++ b/mailhandler/src/main/java/org/eclipse/angus/mail/util/logging/CompactFormatter.java @@ -263,12 +263,9 @@ public String formatMessage(final LogRecord record) { msg = record.getMessage(); } - msg = replaceClassName(msg, record.getThrown()); - //Render any String.format patterns in the message. final Object[] params = record.getParameters(); if (params != null && params.length != 0) { - msg = replaceClassName(msg, params); Locale l = getLocale(record); try { if (l == null) { //BUG ID 6282094 @@ -278,7 +275,9 @@ public String formatMessage(final LogRecord record) { } } catch (RuntimeException ignore) { } + msg = replaceClassName(msg, params); } + msg = replaceClassName(msg, record.getThrown()); return msg; }