From 6341e4304fdd9f6742434b89a14e5850075c36a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E6=A2=A6?= <1101766085@qq.com> Date: Mon, 23 Dec 2024 14:35:09 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E4=BE=9D=E8=B5=96=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dreamlu/mica/logging/appender/LoggingLokiAppender.java | 7 ------- .../dreamlu/mica/logging/config/MicaLoggingProperties.java | 4 ---- 2 files changed, 11 deletions(-) diff --git a/mica-logging/src/main/java/net/dreamlu/mica/logging/appender/LoggingLokiAppender.java b/mica-logging/src/main/java/net/dreamlu/mica/logging/appender/LoggingLokiAppender.java index db848a5a5..19e8fa7f3 100644 --- a/mica-logging/src/main/java/net/dreamlu/mica/logging/appender/LoggingLokiAppender.java +++ b/mica-logging/src/main/java/net/dreamlu/mica/logging/appender/LoggingLokiAppender.java @@ -107,13 +107,6 @@ private Loki4jEncoder getFormat(LoggerContext context, labelCfg.setKeyValueSeparator(properties.getFormatLabelKeyValueSeparator()); labelCfg.setNopex(properties.isFormatLabelNoPex()); loki4jEncoder.setLabel(labelCfg); - // message config - AbstractLoki4jEncoder.MessageCfg messageCfg = new AbstractLoki4jEncoder.MessageCfg(); - String formatMessagePattern = properties.getFormatMessagePattern(); - if (StringUtil.isNotBlank(formatMessagePattern)) { - messageCfg.setPattern(formatMessagePattern); - } - loki4jEncoder.setMessage(messageCfg); // 其他配置 loki4jEncoder.setStaticLabels(properties.isFormatStaticLabels()); loki4jEncoder.setSortByTime(properties.isFormatSortByTime()); diff --git a/mica-logging/src/main/java/net/dreamlu/mica/logging/config/MicaLoggingProperties.java b/mica-logging/src/main/java/net/dreamlu/mica/logging/config/MicaLoggingProperties.java index 1673f1447..6216545ab 100644 --- a/mica-logging/src/main/java/net/dreamlu/mica/logging/config/MicaLoggingProperties.java +++ b/mica-logging/src/main/java/net/dreamlu/mica/logging/config/MicaLoggingProperties.java @@ -148,10 +148,6 @@ public static class Loki { */ private String formatLabelKeyValueSeparator = "="; private boolean formatLabelNoPex = true; - /** - * 消息体格式,默认为: l=%level c=%logger{20} t=%thread | %msg %ex - */ - private String formatMessagePattern; private boolean formatStaticLabels = false; private boolean formatSortByTime = false; }