Improve logging formatting