@pentop I figured it out. Instead of using the usual xml configuration, take a look at this StackOverflow:
http://stackoverflow.com...-of-using-a-config-file
This will allow you to setup log4net in code instead of the app.config. In my case:
public class Logger
{
public static void Setup()
{
Hierarchy hierarchy = (Hierarchy)LogManager.GetRepository();
PatternLayout patternLayout = new PatternLayout();
patternLayout.ConversionPattern = "%date [%thread] %-5level %logger - %message%newline";
patternLayout.ActivateOptions();
var consoleAppender = new ConsoleAppender();
consoleAppender.Layout = patternLayout;
consoleAppender.ActivateOptions();
hierarchy.Root.AddAppender(consoleAppender);
hierarchy.Root.Level = Level.All;
hierarchy.Configured = true;
}
}
then before your tests, run Logger.Setup(). This will allow the log4net output to show up in the Console.