Improve log message functionality.