views:

337

answers:

1

Hi guys,

I'm working with Log4Net under my 3.5 SP1 Web Project and I need to know how can I (reads Log4Net) create the log file as a xml file instead text, line by line...

I'm thinking that can be a easy thing, but... I can't find the trick to apply :(

Thanks.

+1  A: 

you can use the xml layout (http://logging.apache.org/log4net/release/sdk/log4net.Layout.XmlLayout.html), however that does not generate a well formed xml file, the root node will be missing. So you need to do add the root node, before you open it in any xml aware tool.

Dinesh Manne