Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 82430 invoked from network); 15 Jul 2010 14:47:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Jul 2010 14:47:41 -0000 Received: (qmail 629 invoked by uid 500); 15 Jul 2010 14:47:40 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 546 invoked by uid 500); 15 Jul 2010 14:47:39 -0000 Mailing-List: contact log4net-user-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4NET User" List-Id: Delivered-To: mailing list log4net-user@logging.apache.org Received: (qmail 538 invoked by uid 99); 15 Jul 2010 14:47:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jul 2010 14:47:39 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of vrathod@appsecinc.com designates 64.52.115.183 as permitted sender) Received: from [64.52.115.183] (HELO NY1MX1.mail.appsecinc.com) (64.52.115.183) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jul 2010 14:47:31 +0000 Received: from mxe1.nycapt35k.com (192.168.1.19) by NY1MX1.mail.appsecinc.com (10.20.1.2) with Microsoft SMTP Server (TLS) id 8.1.393.1; Thu, 15 Jul 2010 10:46:59 -0400 Received: from mxe1.nycapt35k.com ([192.168.1.19]) by mxe1 ([192.168.1.19]) with mapi; Thu, 15 Jul 2010 10:46:49 -0400 From: "Vivek R. Rathod" To: "log4net-user@logging.apache.org" Date: Thu, 15 Jul 2010 10:46:48 -0400 Subject: RE: programmatic configuration overrides XmlConfigurator.ConfigureAndWatch ? Thread-Topic: programmatic configuration overrides XmlConfigurator.ConfigureAndWatch ? Thread-Index: AQHLI5BiBaeW7OffWkWYgHeaMCe0ZZKw73M6gAEgaXw= Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Sorry, may be I posted this too soon, but I do see the log level revert bac= k to the original value - only I cant make it happen consistently. I looked= through the source code and noticed that there is a 500 msec delay before = the config change is processed. May be thats the reason, but Im not sure. A= ny confirmation from someone who knows would be very helpful :) This brings me to another question though - is there a way to stop watching= the config file once XmlConfigurator.ConfigureAndWatch is called, and lat= er resume watching again? -Vivek ________________________________________ From: Vivek R. Rathod Sent: Wednesday, July 14, 2010 5:26 PM To: log4net-user@logging.apache.org Subject: programmatic configuration overrides XmlConfigurator.ConfigureAndW= atch ? Hi, I observed that if I configure log4net using XmlConfigurator.ConfigureA= ndWatch, and then programmatically change the configuration (change 'root' = log level, for example), further changes to the configuration file (like ch= anging the 'root' log level back to the original value) does not cause the = log level to revert back to the original value in the code... For example, when I call XmlConfigurator.ConfigureAndWatch my 'root' log le= vel is 'DEBUG'. I then change it to 'ERROR' programmtically. But then if I = change the log level back to 'DEBUG' in the config file, in my code the 'ro= ot' logger still has the log level of 'ERROR' Is this the intended behavior or am I missing something? -Vivek