You might want to use Util.prettyPrintXml() to format xml before printing. Makes it more readable in the logs.