public void SetUp()
        {
            System.Net.ServicePointManager.DefaultConnectionLimit = 1000;
            Console.WriteLine("Initializing tests (setting console loggers)...");
            SetUpDebugListeners();

            var originalFormatter = NLog.Config.ConfigurationItemFactory.Default.ValueFormatter;

            ConfigurationItemFactory.Default.ValueFormatter = new NLogValueFormatter(originalFormatter, false);
            ConsoleTarget consoleTarget = new ConsoleTarget("testconsole");
            var           config        = new NLog.Config.LoggingConfiguration();

            config.AddRule(LogLevel.Trace, LogLevel.Fatal, consoleTarget);
            consoleTarget.Layout          = "[${processid:padCharacter=0:padding=5},${threadid:padCharacter=0:padding=2},${date:universalTime=true:format=HH\\:mm\\:ss\\.fff},${level:padding=-5:uppercase=true}] ${message}${onexception:${newline}${literal:text=EXCEPTION OCCURRED}${newline}${exception:format=message}}";
            NLog.LogManager.Configuration = config;
            EventStore.Common.Log.LogManager.SetLogFactory(x => new NLogger(x));

            Application.AddDefines(new[] { Application.AdditionalCommitChecks });
            LogEnvironmentInfo();

            if (!Debugger.IsAttached)
            {
                PortsHelper.InitPorts(IPAddress.Loopback);
            }
        }
Beispiel #2
0
        public void SetUp()
        {
            Console.WriteLine("Initializing tests (setting console loggers)...");
            LogManager.SetLogFactory(x => new ConsoleLogger());
            Application.AddDefines(new[] { Application.AdditionalCommitChecks });
            LogEnvironmentInfo();

            if (!Debugger.IsAttached)
            {
                PortsHelper.InitPorts(IPAddress.Loopback);
            }
        }
Beispiel #3
0
        public void SetUp()
        {
            System.Net.ServicePointManager.DefaultConnectionLimit = 1000;
            Console.WriteLine("Initializing tests (setting console loggers)...");
            SetUpDebugListeners();
            LogManager.SetLogFactory(x => new ConsoleLogger());
            Application.AddDefines(new[] { Application.AdditionalCommitChecks });
            LogEnvironmentInfo();

            if (!Debugger.IsAttached)
            {
                PortsHelper.InitPorts(IPAddress.Loopback);
            }
        }