Make the startup of application context quieter

Every app that requests config from the server starts a mini
application context. We can make it a bit less verbose by
shutting off the startup info logger in the SpringApplication.
This commit is contained in:
Dave Syer
2016-06-01 11:41:31 +01:00
parent ba303fd0aa
commit 7430e7deda

View File

@@ -98,6 +98,10 @@ public class NativeEnvironmentRepository
ConfigurableEnvironment environment = getEnvironment(profile);
builder.environment(environment);
builder.web(false).bannerMode(Mode.OFF);
if (!logger.isDebugEnabled()) {
// Make the mini-application startup less verbose
builder.logStartupInfo(false);
}
String[] args = getArgs(config, profile, label);
// Explicitly set the listeners (to exclude logging listener which would change
// log levels in the caller)