Log more detailed error info when failfast=true and error happened (#1082)

* when failfast=true, client can log detailed error info
This commit is contained in:
Liu Bin
2018-07-12 22:45:07 +08:00
committed by Ryan Baxter
parent 02ae15c3b9
commit 80fd0fa904

View File

@@ -134,8 +134,8 @@ public class ConfigServicePropertySourceLocator implements PropertySourceLocator
}
if (properties.isFailFast()) {
throw new IllegalStateException(
"Could not locate PropertySource and the fail fast property is set, failing",
error);
"Could not locate PropertySource and the fail fast property is set, failing" +
(errorBody == null ? "" : ": " + errorBody), error);
}
logger.warn("Could not locate PropertySource: " + (errorBody == null
? error == null ? "label not found" : error.getMessage()