Chainsaw would not parse a file that had xml embedded in an NDC. Here are the error messages : Parsing error on line 345 and column 418 The element type "log4j:NDC" must be terminated by the matching end-tag </log4j:NDC>". Here is the event: <log4j:event logger="com.tlr.bis.online.charges.jaxprc.trmr.StandardTRMRHandler" timestamp="1132342098624" level="DEBUG" thread="WebContainer : 0"> <log4j:message><![CDATA[handleFault]]></log4j:message> <log4j:NDC><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header/><soapenv:Body><soapenv:Fault><faultcode>Client</faultcode><faultstring><![CDATA[The value "12-31-2005" has an invalid format for EffectiveDate]]></faultstring><faultactor/><detail encodingStyle=""><olc:DataFormatException xmlns:olc="http://thomson.com/tlr/bis/online/charges/"><severity>error</severity><dateTime>2005-11-18T13:28:18.173</dateTime><transactionId></transactionId><EffectiveDate>12-31-2005</EffectiveDate></olc:DataFormatException></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>]]></log4j:NDC> </log4j:event>
Not Chainsaw's fault. The serializer (I assume that log4j's XMLLayout) used to write the sample document is naive and just dropped the NDC content into a CDATA section. Unfortunately, the termination of the CDATA section within the NDC content (the ]]>) prematurely ended the CDATA section added by the serialization. You can't nest CDATA sections. Solutions would be to use a real XML serializer (like that provided by Xerces) or to make the log4j serializer smarter and not depend on CDATA sections (that is, it would convert <, > and & to <, > and & and likely convert characters with code points greater than 127 to &#NNN;
I believe that XMLLayout has been modified to detect embedded CDATA sections. If not, you can use XSLTLayout in the extras companion. Marking as fixed. Reopen if you still see the problem in 1.2.15.
Spoke too soon. XMLLayout did not call appendEscapingCDATA on NDC or throwable content. Added new unit tests and fixed XMLLayout in rev 568774. XSLTLayout handled situation properly, but added same tests to its test suite in 568775.