예제 #1
0
 public void Setup()
 {
     Console.WriteLine("Initializeing log4net ..");
     LogManager.SetLoggerFactory(Log4NetLoggerFactory.Instance);
     GlobalContext.Properties["LogName"] = "TestLog.log";
     XmlConfigurator.ConfigureAndWatch(new FileInfo("tests_log4net.config"));
 }
예제 #2
0
        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);
            }
        }