Added logging support to sample application.