You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Noel Sebastien (BIL)" <Se...@dexia-bil.com> on 2003/11/21 16:47:04 UTC

Problem with adding double quotes in a conversion pattern for PatternLayout specified in an XML configuration

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.
---------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org