There are several ways you could go about doing this. I would start with an abstracted logging solution first, something like Monolog [https://github.com/Seldaek/monolog]. This way you can test and play with what you want to log in a text file to start with then move to a more elegant solution.
Monolog has Handlers for a bunch of different ligging services/containers. For API usage logging I would take a look at the following:
GrayLog2, a really nice Open Source logging system.
Cube, also a great Open Source project for collecting timestamped events.
Loggly, A commercial Cloud-based logging platform. Monolog does not have a handler for Loggly right now but I wrote one that I'm currently using in production. My fork of the Monolog project has this handler in it, I plan on submitting a pull request soon : Download on Gitub here.
Sentry, a realtime event logging and aggregation platform that you can host yourself or use the paid hosted version. Like Loggly, no handler in Monolog for this but it is a really nice project with a nice API you can easily write some simple code to log to.