log4net and all that logging

"West, Jason (Education Cabinet)" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <[email protected]>
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.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Nunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nunit-users
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.