Re: log4net and all that logging
"Di Furness" <[email protected]>
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <71265481F31C3E4CA8478E32AD073214010A11D5@hector.Radicalogic.local> |
Hi Charlie I have just tried version 2.4.7 and you fixed the log4net slowness in the console. MANY-MANY-- THANKS JJJ Cheers...Di Furness Integration Specialist | rL Solutions | T: 61-8-8201-7611| [email protected] <mailto:[email protected]> The contents of this e-mail and any attachments are intended solely for the use of the named addressee(s) and may contain confidential and/or privileged information. Any unauthorized use, copying, disclosure, or distribution of the contents of this e-mail is strictly prohibited by rL Solutions and may be unlawful. If you are not the intended recipient, please notify the sender immediately and delete this e-mail. Thank you. From: [email protected] [mailto:[email protected]] On Behalf Of Charlie Poole Sent: Sunday, 17 February 2008 9:01 AM To: [email protected] Subject: Re: [Nunit-users] log4net and all that logging If so many people don't understand me, I guess it must be me. :-) Let me try again, more carefully... NUnit does internal logging using log4net. When it's activated, NUnit's internal logging can go to console or a file. As delivered, it isn't activated. NUnit /also/ captures any log4net logging from the test or system under test and displays it in the Log tab. That logging is completely separate from anything in the NUnit config and must be controlled by you, in your tests. You should put any log4net config info in a your test config file or a separate log4net file, just as you normally do - NUnit has no control over /whether/ you are logging. NUnit's capture of user logs is not controlled by any external config, which is a source of problems. It is all done internally in code. It turns out that this can cause performance problems when the user app, or anything it calls, is creating a lot of log events so we need to have some external way to disable it. That's what will be fixed in the next release. Charlie ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of West, Jason (Education Cabinet) Sent: Saturday, February 16, 2008 1:16 PM To: [email protected] Subject: [Nunit-users] log4net and all that logging I discovered that the assembly attributes and config files don't work. This is because I believe that nunit is the running .exe/assembly. What I had to do was in my test fixture setup was to manually load log4net. Like below public static void SetupLogging() { LogManager.ResetConfiguration(); // look for the config file where the .dll exists string configDirectory = AppDomain.CurrentDomain.BaseDirectory; FileInfo fileInfo = new FileInfo(configDirectory + @"\log4net.config"); XmlConfigurator.Configure(fileInfo); } Then the logging behaves like your configuration says. Cheers. ------------------------------------------------------------------------- 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 _______________________________________________ Nunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nunit-users