Can you post a small sample of your code that's failing? Are you able to
configure a very simple ConsoleAppender to verify it isn't a configuration
loading issue?
[TestFixture]
public class LoggingWithinVSDebuggerTestFixture
{
[Test]
public void HelloWorldConsoleAppender()
{
var consoleAppender = new ConsoleAppender();
consoleAppender.Layout = new SimpleLayout();
BasicConfigurator.Configure(consoleAppender);
LogManager.GetLogger(GetType()).Debug("Hello World");
}
}
----- Original Message ----
From: SteveClay <[email protected]>
To: [email protected]
Sent: Mon, October 12, 2009 6:09:27 AM
Subject: Debugging from Visual Studio 2005: log statements in dlls don't work
When debugging tests from Visual Studio 2005 the log statements in my dlls
don't work.
The test project has a config xml file with the log4net extension.
Each test is prefixed with [TestMethod] and I use the right click 'Test with
...debugger' option.
Then each dll has a statement like this in its AssemblyInfo.cs:
[assembly: log4net.Config.XmlConfigurator(ConfigFileExtension = "log4net",
Watch = true)]
A log file does get created but it just says 'Log file start' / Log file
end' ..there are many log statements in the executed code which should write
to the log.
Please can someone tell me how can I configure VS or my test project or the
other projects so that logging works when running in debug mode?
--
View this message in context:
http://www.nabble.com/Debugging-from-Visual-Studio-2005%3A-log-statements-in-dlls-don%27t-work-tp25853273p25853273.html
Sent from the Log4net - Users mailing list archive at Nabble.com.