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); }