Adding logging ability to API wrapper, with model for logging to the database.