From c58220c2c57eed125b30f1410f1f2d1635afc961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7VV?= Date: Tue, 8 Jun 2021 12:03:59 +0800 Subject: [PATCH] =?UTF-8?q?fixed:=E6=89=93=E5=8D=B0error=E7=BA=A7=E5=88=AB?= =?UTF-8?q?=E7=9A=84=E4=BF=A1=E6=81=AF=E6=97=B6=EF=BC=8C=E4=B8=A2=E5=A4=B1?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E7=9A=84=E9=94=99=E8=AF=AF=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/plumelog/logback/util/LogMessageUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plumelog-logback/src/main/java/com/plumelog/logback/util/LogMessageUtil.java b/plumelog-logback/src/main/java/com/plumelog/logback/util/LogMessageUtil.java index 5b3099a2..4eeaba5c 100644 --- a/plumelog-logback/src/main/java/com/plumelog/logback/util/LogMessageUtil.java +++ b/plumelog-logback/src/main/java/com/plumelog/logback/util/LogMessageUtil.java @@ -76,8 +76,8 @@ public class LogMessageUtil { if (logEvent.getLevel().equals(Level.ERROR)) { if (logEvent.getThrowableProxy() != null) { ThrowableProxy throwableProxy = (ThrowableProxy) logEvent.getThrowableProxy(); - String[] args = new String[]{LogExceptionStackTrace.erroStackTrace(throwableProxy.getThrowable()).toString()}; - return packageMessage(logEvent.getMessage(), args); + String[] args = new String[]{logEvent.getFormattedMessage() + "\n" + LogExceptionStackTrace.erroStackTrace(throwableProxy.getThrowable()).toString()}; + return packageMessage("{}", args); } else { Object[] args = logEvent.getArgumentArray(); if (args != null) { -- Gitee