Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 86841 invoked from network); 17 Dec 2004 21:35:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 17 Dec 2004 21:35:33 -0000 Received: (qmail 22948 invoked by uid 500); 17 Dec 2004 21:35:31 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 22919 invoked by uid 500); 17 Dec 2004 21:35:30 -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" Delivered-To: mailing list log4net-user@logging.apache.org Received: (qmail 22889 invoked by uid 99); 17 Dec 2004 21:35:30 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of nicko@neoworks.com designates 80.168.17.114 as permitted sender) Received: from Unknown (HELO kronos.neoworks.co.uk) (80.168.17.114) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 17 Dec 2004 13:34:27 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Log4net Configuration Settings Date: Fri, 17 Dec 2004 21:34:28 -0000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Log4net Configuration Settings Thread-Index: AcTkak4o0XvrpGYRTJyeaqgeKNxYTQAE35ig From: "Nicko Cadell" To: "Log4NET User" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Which version of log4net are you using? If this is a new project you should start with version 1.2 beta 8. In the you have specified but there is no appender with that name. There is a did you mean to specify instead? You have 2 FileAppenders appending to the same file. This will not work as the FileAppender takes an exclusive write lock on the file. This will mean that the first appender to open the file will win, and the second appender will not be able to write out messages at all. You should use rather than , however is still supported and this should not be causing an error. Your defines the an appender to use. This will be inherited by child loggers, i.e. the will be inherited by the XMLTest.WebForm1 logger, therefore you do no need to add another appender to that logger (i.e. ) especially as it would try to write to the = same file.=20 In your web application you need to initialise log4net. This can be done programmatically by calling the DOMConfigurator.Configure method from your Application_Start method, or it can be done using a DOMConfiguratorAttribute assembly level attribute. Do you have any initialisation code, if so what does it look like. How are you getting the logger in your code? i.e. how are you calling LogManager.GetLogger. You have set = therefore log4net should be outputting internal debug info. You can use DebugView from sysinternals to view the debug data (http://www.sysinternals.com/ntw2k/freeware/debugview.shtml). Can you post the output produced? Cheers, Nicko > -----Original Message----- > From: Abhijit Salvi [mailto:Abhijit.Salvi@albertsons.com]=20 > Sent: 17 December 2004 18:58 > To: log4net-user@logging.apache.org > Subject: Log4net Configuration Settings >=20 > Hi, >=20 > =20 >=20 > I have recently started using the Log4net Tool. I=20 > read the documentation and it has great potential for logging=20 > errors, debugging purposes and tracing. >=20 > =20 >=20 > However I have not been able to probably configure=20 > correctly w.r.t. to my project. >=20 > =20 >=20 > Here are my settings in the Web.Config. >=20 > =20 >=20 > =20 >=20 > >=20 >
type=3D"log4net.Config.Log4NetConfigurationSectionHandler,log4net"/> >=20 > >=20 > =20 >=20 > =20 >=20 > >=20 > type=3D"log4net.Appender.FileAppender"> >=20 > value=3D"c:\\Inetpub\\wwwroot\\XMLTest\\XMLTest1.txt" /> >=20 > >=20 > >=20 > [%thread] %-5level %logger [%ndc] - %message%newline" /> >=20 > >=20 > >=20 > type=3D"log4net.Appender.FileAppender"> >=20 > value=3D"c:\\Inetpub\\wwwroot\\XMLTest\\XMLTest1.txt" /> >=20 > >=20 > >=20 > [%thread] %-5level %logger [%ndc] - %message%newline" /> >=20 > >=20 > >=20 > >=20 > >=20 > >=20 > >=20 > >=20 > >=20 > >=20 > >=20 > >=20 > =20 >=20 > =20 >=20 > >=20 > >=20 > >=20 > =20 >=20 > =20 >=20 > It is a .NET Web Application with namespace of XMLTest. It=20 > creates a dll XMLTest.dll. However I debugged the Log4net=20 > code and it takes the default Assembly instead of the XMLTest=20 > assembly. As a result the XMLTest1.txt file is not created. >=20 > =20 >=20 > Could anyone please tell me what I need to do more?=20 >=20 > =20 >=20 > Thanks in advance, >=20 > =20 >=20 > Regards, >=20 > Abhi >=20 > =20 >=20 >=20