Add logging to user and API actions.