Added logging function for web service