Re: how to configure log4net in a C# DLL

"Charlie Poole" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <[email protected]>
Hi,

The App.config has no effect on nunit tests. The config file for the tests
must be named after the test dll or project and placed in the proper
location
in order to be accessible to the tests. This can be copy of your normal
App.config file. See http://nunit.org/?p=configFiles&r=2.4.6 for details.

Charlie

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf 
> Of Vasudevan, Nivithadevi IN BLR SISL
> Sent: Tuesday, January 08, 2008 4:40 AM
> To: [email protected]
> Subject: Re: [Nunit-users] how to configure log4net in a C# DLL
> 
>  
> Hi,
> 	I am using log4net in my application.
> 	I had been using it only windows applications(exe) till now.
> 	Now I am developing a DLL where I use log4net.
> 	I have the configuration details in my App.config file.
>  	In the AssemblyInfo.cs I give the following attribute:
> 		[assembly: log4net.Config.XmlConfigurator()]
> 	But the problem is the messages are not logging into 
> the file I mentioned in App.config.
>       If I give the following in AssemblyInfo.cs, it starts working
> fine:
> 		[assembly: 
> log4net.Config.XmlConfigurator(ConfigFile = 
> @"Y:\Newcor_MIS\SUB_Common\CMP_Common.NET\Common\App.config", 
> Watch = true)]
> 	Here I am mentioning the entire path of the App.config 
> file, only this works.
> 	I even tried placing the App.config file in bin folder 
> of my application but it didn't help me much.
> 	Can you please suggest me if I have missed out anything?
> 
> Regards,
>      Nivitha
> 
> 
> 
>  
>  
> Important notice:This e-mail and any attachment thereto 
> contains corporate proprietary information. If you have 
> received it by mistake, please notify us immediately by reply 
> e-mail and delete this e-mail and its attachments from your 
> system. Thank You.
> 
> --------------------------------------------------------------
> -----------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for just about 
> anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.n
> et/marketplace
> _______________________________________________
> Nunit-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/nunit-users
> 



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.