I would like the Logbook logger to log at level INFO instead of TRACE. The documentation states:
The logbook logger must be configured to trace level in order to log the requests and responses
I understand that perhaps this is a best practice but I don't understand why it couldn't at a technical level log at INFO. When I "set" it to log at INFO level it just doesn't log anything. I am using version 2.13.0 of logbook-spring-boot-starter
I have tried setting the application.yml as follows:
logbook:
exclude:
- /swagger-ui.html
- /schema/**
- /health
- /favicon.ico
- /togglz-console/**
filter.enabled: true
format.style: json
write:
level: INFO
max-body-size: 8192
I also tried setting
logging.level.org.zalando.logbook to INFO.
Running debug on logback says it propagated the INFO to Logbook and no errors are logged:
|-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@6b3bcab7 - Propagating INFO level on Logger[org.zalando.logbook] onto the JUL framework
Did I miss anything? Can I try anything else?
If you are using Spring Boot Autoconfiguration, you can take a peek at
DefaultHttpLogWriterand create your ownHttpLogWriterthat logs on your desired level: