What is the best way log request and responses in spring boot for all applicable http methods (GET, POST, PUT etc) so that at a later point it can be centralized and analyzed using elastic search, log stash and kibana. Appreciate the advises.
Asked
Active
Viewed 788 times
0
-
If you're using Spring Boot there are many options. Look into Spring Boot Actuator https://www.baeldung.com/spring-boot-actuator-http or implement a Mapping Filter https://www.baeldung.com/spring-http-logging. I recommend some further research on the topic. If your intention is to obtain metrics Actuator seems the way to go since it's also integrated with metrics and many other features: https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-features.html – Sara Jun 12 '20 at 18:07
-
Thanks for your time. I will go through these. – TheNightsWatch Jun 12 '20 at 18:31
-
Might be helpful https://stackoverflow.com/q/56987541/10961238 – Romil Patel Jun 13 '20 at 08:28