Can log4net appenders be defined in their own XML files?

Posted by ladenedge on Stack Overflow See other posts from Stack Overflow or by ladenedge
Published on 2010-05-12T13:31:09Z Indexed on 2010/05/12 13:34 UTC
Read the original article Hit count: 206

Filed under:

I want to define a handful of (ADO.NET) appenders in my library, but allow users of my library to configure the use of those appenders. Something like this seems to be what I want:

XmlConfigurator.Configure(appenderStream1);
XmlConfigurator.Configure(appenderStream2);
XmlConfigurator.Configure();

But that doesn't seem work, in spite of the debug output containing messages like this:

Configuration update mode [Merge].

What is the right way to do this? Or, is there an alternative to asking users to duplicate large chunks of XML configuration?

© Stack Overflow or respective owner

Related posts about log4net