예제 #1
0
        public void ConfigureLogger()
        {
            var layout = new PatternLayout("%-4timestamp [%thread] %-5level %logger %ndc - %message%newline");

            var channelFactory = Substitute.For <ChannelFactory>();

            _channel = Substitute.For <IEventChannel>();
            channelFactory.Create("localhost", 8765, 1).Returns(_channel);
            _appender = new BrowserConsoleAppender(channelFactory)
            {
                Host   = "localhost",
                Port   = 8765,
                Layout = layout,
                Buffer = 1
            };
            layout.ActivateOptions();
        }
        public void ConfigureLogger()
        {
            var layout = new PatternLayout("%-4timestamp [%thread] %-5level %logger %ndc - %message%newline");

            var channelFactory = Substitute.For<ChannelFactory>();
            _channel = Substitute.For<IEventChannel>();
            channelFactory.Create("localhost", 8765, 1).Returns(_channel);
            _appender = new BrowserConsoleAppender(channelFactory)
            {
                Host = "localhost",
                Port = 8765,
                Layout = layout,
                Buffer = 1
            };
            layout.ActivateOptions();
            
        }