Improve logging performance.