I am using Zolando Logbook for Spring Boot services (Version 2.1.6 spring boot version, 1.13.0 Logbook version) and the actuator health endpoint gets logged even though it is specified as excluded. Other endpoints are excluded correctly when included in yaml file.
This is the relevant section of the yaml file:
logbook:
exclude:
- /actuator/health
- /actuator/**
- /health
- /v2/api-docs
- /swagger-ui.html
I had the same problem, I tried as following and it worked:
logbook:
exclude[1]: '**/swagger-ui.html'
exclude[0]: '**/v2/api-docs'
exclude[3]: '**/swagger-resources/**'
exclude[2]: '**/webjars/**'
exclude[5]: '**/'
exclude[4]: '**/csrf'
In case you have .properties file :
logbook.exclude[0]=**/v2/api-docs
logbook.exclude[1]=**/swagger-ui.html
logbook.exclude[2]=**/webjars/**
logbook.exclude[3]=**/swagger-resources/**
logbook.exclude[4]=**/csrf
logbook.exclude[5]=**/
In case you have to exclude more paths, You may define as :
logbook.write.max-body-size=10
I took the solution from here
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