[ 
https://issues.apache.org/jira/browse/LOG4NET-5?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Bodewig updated LOG4NET-5:
---------------------------------

    Fix Version/s: 1.2 Maintenance Release

> Support layouts that generate XML instead of text
> -------------------------------------------------
>
>                 Key: LOG4NET-5
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-5
>             Project: Log4net
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.2.9
>         Environment: From sourceforge - 795051 - Curt Arnold
>            Reporter: Nicko Cadell
>             Fix For: 1.2 Maintenance Release
>
>
>  I recently wrote an appender to an destination that could
> only accept XML documents and a custom layout that
> implemented the specific schema that it accepted.
> Unfortunately, only at that point did I realized that
> FormatXml was protected.
> I've hacked my copy to make XmlLayoutBase.FormatXml
> public to allow me to acheive my objectives without adding
> the complexity of serializing to a string and then trying to
> fixup encoding or other issues or reparsing.
> The XmlLayoutBase.Format went through a huge amount of
> complexity to efficiently produce string representations from
> calls to FormatXml. While that code could be retained for
> compatibility with arbitary appenders, I think the following
> would be beneficial.
> 1. Introduce an Xml specific layout interface containing
> FormatXml (say IXmlLayout)
> 2. Have XmlLayoutBase implement IXmlLayout
> 3. Have the file appenders check if the layout supports
> IXmlLayout, if it does then create one XmlWriter for the file
> and only use IXmlLayout.FormatXml in Append.
> Curt Arnold

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to