Added logging functionality to the server.