update the way to log