From 8fd9c685a22437a845d43a41ab120b363b0ae796 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 19 Aug 2020 13:20:06 -0700 Subject: [PATCH] Reduce HTTP debug logging when building image Update `BuildImageMojo` so that commons HTTP wire logging is configured to ERROR. Without this update, running `mvn -X` will produce a great deal of logging since by default HTTP Client logs all bytes transfered at DEBUG and Maven will enable DEBUG for all logs. Closes gh-22674 --- .../java/org/springframework/boot/maven/BuildImageMojo.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/BuildImageMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/BuildImageMojo.java index fab1b6660a..77ea852f55 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/BuildImageMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/BuildImageMojo.java @@ -65,6 +65,10 @@ public class BuildImageMojo extends AbstractPackagerMojo { private static final String BUILDPACK_JVM_VERSION_KEY = "BP_JVM_VERSION"; + static { + System.setProperty("org.slf4j.simpleLogger.log.org.apache.http.wire", "ERROR"); + } + /** * Directory containing the JAR. * @since 2.3.0