I am using log4j to log request/response XMLs sent by my application.
The problem is that the xml contents are getting logged with newlines. Any suggestions as to how to format so as to preserve the xml structure as it is received??
Following is my appender:
<appender name="xmlFileAppender" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="d:/LOG/log4j/appName_${weblogic.Name}_XMLS.log" />
<param name="Append" value="true" />
<rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
<param name="ActiveFileName" value="d:/LOG/log4j/appName_${weblogic.Name}_XMLS.log" />
<param name="FileNamePattern" value="d:/LOG/log4j/appName_${weblogic.Name}_XMLS.%d.log.gz" />
</rollingPolicy>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{DATE}][%-p][%c{3}%x][%m]%n"/>
</layout>
</appender>