Updated to only source the content string when it will actually be
writing to the log enhancing performance.