public void Setup() { Console.WriteLine("Initializeing log4net .."); LogManager.SetLoggerFactory(Log4NetLoggerFactory.Instance); GlobalContext.Properties["LogName"] = "TestLog.log"; XmlConfigurator.ConfigureAndWatch(new FileInfo("tests_log4net.config")); }
private void SetupLogging() { var file = new FileInfo(Path.Combine(this.BinaryPath, "log4net.config")); if (file.Exists) { LogManager.SetLoggerFactory(Log4NetLoggerFactory.Instance); GlobalContext.Properties["LogFileName"] = "MS_" + this.ApplicationName; XmlConfigurator.ConfigureAndWatch(file); } }