From 7430e7deda2c1ca3312bb649e27c06b0fb9fd6af Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Wed, 1 Jun 2016 11:41:31 +0100 Subject: [PATCH] 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. --- .../server/environment/NativeEnvironmentRepository.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/NativeEnvironmentRepository.java b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/NativeEnvironmentRepository.java index dbc0ab37..2b6b8aca 100644 --- a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/NativeEnvironmentRepository.java +++ b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/NativeEnvironmentRepository.java @@ -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)