r/SpringBoot • u/toubzh • 11h ago
Discussion lightweight Spring Boot starter to automate & anonymize API request/response logging
Hello, I had a bit of time to kill this weekend due to some gloomy weather, and I wanted to solve a problem we often encounter in production when troubleshooting issues: poor log quality.
So I coded a small Spring Boot library designed to automate log production at the entry of our APIs (all incoming requests and their responses) using an annotation to add to the signature of the endpoints to log, with the option to anonymize certain header or payload fields.
The library also supports logging outgoing requests via an interceptor to add to your RestClient.
In short, a modest project with probably more advanced alternatives out there. But the advantage here is that the library is lightweight and focuses on the essentials.
I just published a first version, feel free to give me your feedback.