fix [ISSUE #12323] , using the project's logback packagingData configuration instead of logback-nacos.xml's packagingData configuration (#12360)
This commit is contained in:
parent
a6047fae45
commit
8664a1aec6
@ -109,7 +109,9 @@ public class LogbackNacosLoggingAdapter implements NacosLoggingAdapter {
|
|||||||
configurator.setContext(loggerContext);
|
configurator.setContext(loggerContext);
|
||||||
if (StringUtils.isNotBlank(location)) {
|
if (StringUtils.isNotBlank(location)) {
|
||||||
try {
|
try {
|
||||||
|
boolean isPackagingDataEnabled = loggerContext.isPackagingDataEnabled();
|
||||||
configurator.configure(ResourceUtils.getResourceUrl(location));
|
configurator.configure(ResourceUtils.getResourceUrl(location));
|
||||||
|
loggerContext.setPackagingDataEnabled(isPackagingDataEnabled);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new IllegalStateException("Could not initialize Logback Nacos logging from " + location, e);
|
throw new IllegalStateException("Could not initialize Logback Nacos logging from " + location, e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user