I’m building an API and, as a feature, I would like to provide the admin a log of every request received and it’s corresponding response. This log is a table in my database and in Cake model.
What do you guys think is the best approach to handle this?
Hi Zuluru,
Thanks for your answer. I am working indeed with a middleware based app skeleton. Since I never really used the middleware, I wanted to collect some expertise, but I suspected it was the right layer for the job.
Saludos,
I think that approach is correct - using middleware for such things is always best choice, and you can always exclude from logs authentication related calls.