Peter, because of the hierarchical nature of the loggers in log4net I'm not sure turning then on and off that way would be wise.
Imagine this logger hierarchy: A A.B A.B.C A.B.C.D I set a logger for A to enable info logging. I set a logger for A.B.C to warn logging. If I check IsInfoEnabled on the A.B logger it will be true, right? Inherited from A If I check IsInfoEnabled on A.B.C.D is will be false, right? Inherited from A.B.C But if I was able to set IsInfo = true on A.B.C.D what does that mean? Is there now a new logger at A.B.C.D? If so, what appenders? If not, do I update the A.B.C logger since that's the first one I find up my tree? The variations and consequences are too crazy to have a correct answer to that question, thus... readonly. :-) IIRC, there is a separate set of method calls for manipulating the logging hierarchy. -Walden -- Walden H Leverich III Tech Software & BEC - IRBManager (516) 627-3800 x3051 wald...@techsoftinc.com<mailto:wald...@techsoftinc.com> http://www.TechSoftInc.com<http://www.techsoftinc.com/> http://www.IRBManager.com<http://www.irbmanager.com/> Quiquid latine dictum sit altum viditur. (Whatever is said in Latin seems profound.) From: Howe, Peter L [mailto:ph...@paychex.com] Sent: Tuesday, June 04, 2013 11:23 AM To: log4net-dev@logging.apache.org Subject: Is<level>Enabled Question: Why are the ILog instance properties (IsDebugEnabled, IsInfoEnabled, etc.) read-only? Would it not be simpler to be able to turn these on or off at will from code, instead of deploying a new XML file? Is there a programmatic way to turn levels on or off (for instance, by an application that reads such switches from a database.)? Thanks in advance. The information contained in this message may be privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify your representative immediately and delete this message from your computer. Thank you.