Magento Api Logging

I recently had the need to debug the Magento API and instantly took to Google to see what solutions already existed. I found a few solutions on stackoverflow but these all involved either changing core files, adding code to index.php or setting up a proxy.

After looking into this further I realised all the API calls come through a set of controllers in Mage_Api. In order to log all API calls I simply needed to rewrite the controllers, add my logging code and then call the original controller. I’ve created a module that does just this and added it to GitHub here.

Tags: apilogging