Noel Sebastien (BIL)
2003-11-21 15:47:04 UTC
Hi everyone,
I have a problem with adding double quotes in a conversion pattern for PatternLayout specified in an XML configuration.
Let's see the XML configuration fragment :
<appender name="AuditActivityFileAppender" class="org.apache.log4j.FileAppender">
<param name="File" value="${ginko.rootdir.as.file}/logs/audit_activity.log" />
<param name="Append" value="true" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ISO8601}%m%n"/>
</layout>
</appender>
I would like to surround the date generated by %d{ISO8601} with double quotes like %d{ISO8601}, in order to output "01:15:23" instead of the plain 0115:23 ... BUT XML delimiter is this double quote !
Thus a XML parsing error occurs !! How can I do ? Do you have any escape sequence for the special character ", such as %q (like Quote) ?
I can't find any solution.
Thank you in advance ...
Sébastien
---------------------
An electronic message is not binding on its sender.
Any message referring to a binding engagement must be confirmed in writing and duly signed.
---------------------
I have a problem with adding double quotes in a conversion pattern for PatternLayout specified in an XML configuration.
Let's see the XML configuration fragment :
<appender name="AuditActivityFileAppender" class="org.apache.log4j.FileAppender">
<param name="File" value="${ginko.rootdir.as.file}/logs/audit_activity.log" />
<param name="Append" value="true" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ISO8601}%m%n"/>
</layout>
</appender>
I would like to surround the date generated by %d{ISO8601} with double quotes like %d{ISO8601}, in order to output "01:15:23" instead of the plain 0115:23 ... BUT XML delimiter is this double quote !
Thus a XML parsing error occurs !! How can I do ? Do you have any escape sequence for the special character ", such as %q (like Quote) ?
I can't find any solution.
Thank you in advance ...
Sébastien
---------------------
An electronic message is not binding on its sender.
Any message referring to a binding engagement must be confirmed in writing and duly signed.
---------------------