Fix issues with newlines in a log message.