Oops, looks like I screwed up the reply. Yes, in my project I created a FileInfo that points to the web.config file.
In Mike's blog, he's doing a different method using an assembly attribute as described in the configuration attributes section of the config page, which does not require specifying the file. http://logging.apache.org/log4net/release/manual/configuration.html Hope that helps! - Tomas -----Original Message----- From: sanjay K [sanja...@dell.com] Received: 3/17/10 1:15 AM To: log4net-user@logging.apache.org [log4net-u...@logging.apache.org] Subject: Re: no log file generated Tomas Ramirez windward.net writes: Thanks, I’ll try that out when I get a chance. But actually, I did figure this out last night – I just needed to call XmlConfigurator.Configure (FileInfo) and explicitly tell the configurator where the xml file was. I asked Mike Knowles about it and he updated his blog article about it with a full source code project specifically for sharepoint: http://mikeknowles.com/blog/2009/02/17/ConfiguringLog4netForSharePointWindowsAu thentication.aspx Thanks for the help! - Tomas From: Cankut Eskin [mailto:cankuteskin gmail.com] Sent: Wednesday, February 24, 2010 1:25 AMTo: Log4NET UserSubject: Re: no log file generated Try enabling log4net internal debugging to see if something is going wrong. How to enable internal debugging is described in http://logging.apache.org/log4net/release/faq.htmlAnd make sure that the process running your application has permission to write/create "F:\arrowlog.txt". On 24 February 2010 02:19, Tomas Ramirez windward.net wrote: I've done some investigating, and here's what I noticed. My web parts (in my dev environment) are capable of creating and writing to the file that I specified in the RollingFileAppender, so it shouldn't be any problem with permission to that file. That makes me think that it must be a problem with log4net getting the configuration information in the first place. But I'm just theorizing, in hopes that this will help someone help me figure out what's going on.- Tomas -----Original Message-----From: Tomas Ramirez [mailto:tomasr windward.net]Sent: Tuesday, February 23, 2010 3:02 PMTo: log4net-user logging.apache.orgSubject: no log file generatedHi, I'm trying to use log4net in sharepoint web parts, but no log file is being generated. Is there something I'm forgetting to do? Here's what I've got:I've got a web part that calls: log4net.Config.XmlConfigurator.Configure(); ILog log = LogManager.GetLogger(typeof(DataDefinitionWebPart)); log.Fatal (String.Format("{0}\n{1}\n{2}", ex.Message, ex.Source, ex.StackTrace));Then in my web config, I have a log4net section in configSections And I here's what I have in the log4net section: Thanks!- Tomas -- Cankut Eskin Hi Tomas, I'm trying to get the same working. What is the file whose name need to pass in to the call XmlConfigurator.Configure(FileInfo). Does the FileInfo points to the Web.config file, which contains the log4.net configurations? Mike's blog still does not show how to pass in the file name (or what is the file name). Thanks, Sanjay - Tomas