Improve logging helper.