I have a Spring Boot 2.0.5 command-line application with mostly default configurations.
How can I enable HTTPClient wire-logging?
I tried throwing this into a log4j.properties
file:
log4j.rootLogger=INFO, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%c] %m%n
log4j.logger.org.apache.http=DEBUG
I tried adding spring-boot-starter-logging
to the pom.xml
.
I also tried adding JVM parameters to the app launch:
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
-Dorg.apache.commons.logging.simplelog.showdatetime=true
-Dorg.apache.commons.logging.simplelog.log.org.apache.http=DEBUG
But nothing works. No httpclient logs at all.
How can I get some httpclient logs?
Solution was counter-intuitive. Add this line to application.properties
:
logging.level.org.apache.http=DEBUG
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With