At every moment in the world things change, said some guy.
We're sitting on a big fat REST API server which is becoming more and more of a burden to maintain because good Java developers are hard to find, expensive, development takes much more time, so we're slowly switching various application parts to Rails, which is... well, nevermind.
There are way too many APIs (and some are poorly documented) to just clone functionality by looking at the docs, so my idea is to find a way to log everything that's passing through this service for a while, in a machine-readable format we can later index, process and report, so we can gradually rewrite the code.
Is there a "clean" not so "hacky" way of doing this with Tomcat? Or should I go down the wireshark/reverse proxy way?
TIA!
You can create a payload logging filter and configure it in your web.xml. You can also use an output filter for the response. This and this should be helpful working examples.
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