fix: fix declaration and log level error

pull/2816/head
chengpu 2 years ago
parent 32e75e2d9a
commit 993c1633b9

@ -27,7 +27,7 @@ package com.alibaba.cloud.nacos.configdata;
* the local profile specific config. * the local profile specific config.
* *
* @author freeman * @author freeman
* @since 2021.0.1.1 * @since 2021.0.4.0
*/ */
public enum ConfigPreference { public enum ConfigPreference {
/** /**

@ -92,7 +92,7 @@ public class NacosConfigDataLoader implements ConfigDataLoader<NacosConfigDataRe
return new ConfigData(propertySources, getOptions(context, resource)); return new ConfigData(propertySources, getOptions(context, resource));
} }
catch (Exception e) { catch (Exception e) {
log.warn("Error getting properties from nacos: " + resource, e); log.error("Error getting properties from nacos: " + resource, e);
if (!resource.isOptional()) { if (!resource.isOptional()) {
throw new ConfigDataResourceNotFoundException(resource, e); throw new ConfigDataResourceNotFoundException(resource, e);
} }
@ -127,7 +127,7 @@ public class NacosConfigDataLoader implements ConfigDataLoader<NacosConfigDataRe
} }
catch (IllegalArgumentException ignore) { catch (IllegalArgumentException ignore) {
// illegal preference value, just ignore. // illegal preference value, just ignore.
log.warn(String.format( log.error(String.format(
"illegal preference value: %s, using default preference: %s", "illegal preference value: %s, using default preference: %s",
specificPreference, preference)); specificPreference, preference));
} }

Loading…
Cancel
Save