Steve,

Log4net has an XmlLayout that can be used to render events as XML:
log4net.Layout.XmlLayout.

The class has the following documentation:

The output of the XmlLayout consists of a series of log4net:event
elements. It does not output a complete well-formed XML file. The output
is designed to be included as an external entity in a separate file to
form a correct XML file. 

For example, if abc is the name of the file where the XmlLayout output
goes, then a well-formed XML file would be: 

            <?xml version="1.0" ?>
            
            <!DOCTYPE log4net:events SYSTEM "log4net-events.dtd"
[<!ENTITY data SYSTEM "abc">]>
            
            <log4net:events version="1.2"
xmlns:log4net="http://log4net.sourceforge.net/";>
                &data;
            </log4net:events>
            
This approach enforces the independence of the XmlLayout and the
appender where it is embedded. 

The version attribute helps components to correctly interpret output
generated by XmlLayout. The value of this attribute should be "1.2" for
release 1.2 and later. 

Alternatively the Header and Footer properties can be configured to
output the correct XML header, open tag and close tag. 
 

Nicko

> -----Original Message-----
> From: Steve Burkett [mailto:[EMAIL PROTECTED] 
> Sent: 13 July 2004 17:35
> To: [email protected]
> Subject: XML appender
> 
> I may have missed it, but it there a XML file appender 
> available for log4net?  Thanks.
> 

Reply via email to