From 8664a1aec6234fc9a31a1aca0421cd54532bf861 Mon Sep 17 00:00:00 2001 From: dingjs Date: Thu, 18 Jul 2024 11:10:09 +0800 Subject: [PATCH] fix [ISSUE #12323] , using the project's logback packagingData configuration instead of logback-nacos.xml's packagingData configuration (#12360) --- .../logger/adapter/logback12/LogbackNacosLoggingAdapter.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/logger-adapter-impl/logback-adapter-12/src/main/java/com/alibaba/nacos/logger/adapter/logback12/LogbackNacosLoggingAdapter.java b/logger-adapter-impl/logback-adapter-12/src/main/java/com/alibaba/nacos/logger/adapter/logback12/LogbackNacosLoggingAdapter.java index b60493628..07d3f6106 100644 --- a/logger-adapter-impl/logback-adapter-12/src/main/java/com/alibaba/nacos/logger/adapter/logback12/LogbackNacosLoggingAdapter.java +++ b/logger-adapter-impl/logback-adapter-12/src/main/java/com/alibaba/nacos/logger/adapter/logback12/LogbackNacosLoggingAdapter.java @@ -109,7 +109,9 @@ public class LogbackNacosLoggingAdapter implements NacosLoggingAdapter { configurator.setContext(loggerContext); if (StringUtils.isNotBlank(location)) { try { + boolean isPackagingDataEnabled = loggerContext.isPackagingDataEnabled(); configurator.configure(ResourceUtils.getResourceUrl(location)); + loggerContext.setPackagingDataEnabled(isPackagingDataEnabled); } catch (Exception e) { throw new IllegalStateException("Could not initialize Logback Nacos logging from " + location, e); }