I have a spring boot project and using logbook library for logging requests and responses.
In one of the REST API services, One of the properties data type is byte[], So when the client sends the request, because of that data type it prints a lot of log in the console and that is not what I wanted.
I have seen in the document that you can exclude some path or content type, but not by name or data types.
Here how document suggest for configuration:
Logbook logbook = Logbook.builder()
.condition(exclude(
requestTo("/health"),
requestTo("/admin/**"),
contentType("application/octet-stream"),
header("X-Secret", newHashSet("1", "true")::contains)))
.build();