logbook icon indicating copy to clipboard operation
logbook copied to clipboard

Disable LogbookExchangeFilterFunction logging based on logbook property

Open aldex32 opened this issue 7 months ago • 1 comments

I would like to have a logbook property where I can both disable servlet filters but also LogbookExchangeFilterFunction. Seems like logbook.filter.enabled property is only intended for servlet filter support as far as I can see in LogbookAutoConfiguration. Can this property also be used for http client logging?

Detailed Description

I am using [email protected] together with [email protected]. And when I set logbook.filter.enabled=false, only the servlet logging gets disabled, but the WebClient logging still occurs. I am not sure if this is as by design or is a bug.

Context

This is important because users of this library can use a single property to enable/disable request/response logging. And since LogbookExchangeFilterFunction requires a logbook bean which is autoconfigured based on properties, why not leveraging the property to disable/enable the logging.

Your Environment

  • Version used: 3.9.0

aldex32 avatar Jul 04 '24 12:07 aldex32