I'm writing an API in Sinatra and I want to log the requests that are coming into my service to a table in the database. I want to include the following information:
- Date/Time
- Endpoint
- User-Agent
- IP Address
- Payload
What's the best approach here? How can I tap into these and save them off? Maybe there is a gem out there I don't know about.