I wanted to do this as well because it’s possible we may use a different logging framework in the future or specific customers may have their own logging framework (it’s happened already).
I found that there is no real good way to configure log4net at runtime. There is not a full API set for doing this and what methods appear to provide some of the functionality don’t seem to work (they’re used internally by log4net and don’t seem to be intended to be used externally).
What I ended up having to do is provide a wrapper around managing log4net.config file that allows users to change logging at runtime.
It’s hacky, but that’s the only way to do it as far as I can tell.
-Chad
_____________________________________________
From: Matthew Griffore [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 10, 2004 8:09 AM
To: 'Log4NET User'
Subject: config-free log4net?
I have heard similar questions beiing asked but have not seen any clear-cut answers. Thanks.
Matthew Griffore | Application Integration | Union Gas
Union Gas ~ 800.571.8446:2682 ~ [EMAIL PROTECTED]
