I have a simple Spring boot app with logbook-spring-boot-starter dependency of the logbook library.
The document says for ignoring health check request, wire up the logbook like this:
Logbook logbook = Logbook.builder()
.condition(exclude(
requestTo("/health"),
requestTo("/admin/**"),
contentType("application/octet-stream"),
header("X-Secret", newHashSet("1", "true")::contains)))
.build();
It may sound naive, But I don't know where should wire it up. Should I put it in any specific class or method with specific annotation? An example would help.
It is really simple. Just create a bean of the
Logbooktype in a@Configurationclass:Of course, the specific library must be present on the classpath:
The README.md, section Spring Boot Starter says the following and provides a table of configurable integration points.