public void SetUp()
        {
            appender = new GelfRabbitMqAppenderAsync
                           {
                               Threshold = Level.Error,
                               HostName = "localhost",
                               VirtualHost = "/",
                               Name = "GelfRabbitMQAdapterAsync",
                               Port = 5672,
                               Exchange = "tests.log4net.gelf.appender",
                               Username = "******",
                               Password = "******",
                               Facility = "test-system"
                           };
            appender.ActivateOptions();

            var root = ((Hierarchy)LogManager.GetRepository()).Root;
            root.AddAppender(appender);
            root.Repository.Configured = true;
            logger = LogManager.GetLogger(GetType());

            testingRabbitListener = new TestingRabbitListener();
        }
Ejemplo n.º 2
0
        public void SetUp()
        {
            appender = new GelfRabbitMqAppenderAsync
            {
                Threshold   = Level.Error,
                HostName    = "localhost",
                VirtualHost = "/",
                Name        = "GelfRabbitMQAdapterAsync",
                Port        = 5672,
                Exchange    = "tests.log4net.gelf.appender",
                Username    = "******",
                Password    = "******",
                Facility    = "test-system"
            };
            appender.ActivateOptions();

            var root = ((Hierarchy)LogManager.GetRepository()).Root;

            root.AddAppender(appender);
            root.Repository.Configured = true;
            logger = LogManager.GetLogger(GetType());

            testingRabbitListener = new TestingRabbitListener();
        }