Implements an Appender for test purposes that counts the number of output calls to Append.
This appender is used in the unit tests.
Inheritance: log4net.Appender.AppenderSkeleton
Exemplo n.º 1
0
        public void SetupRepository()
        {
            _hierarchy = new Repository.Hierarchy.Hierarchy();

            _countingAppender = new CountingAppender();
            _countingAppender.ActivateOptions();

            _httpRequestAppender = new HttpRequestAppenderStub();
            _httpRequestAppender.AddAppender(_countingAppender);

            _httpRequestAppender.ClearFilters();
            _httpRequestAppender.Threshold = Level.All;
            _httpRequestAppender.Layout    = new SimpleLayout();

            _httpRequestAppender.ActivateOptions();

            BasicConfigurator.Configure(_hierarchy, _httpRequestAppender);
        }
        public void SetupRepository()
        {
            _hierarchy = new Repository.Hierarchy.Hierarchy();

            _countingAppender = new CountingAppender();
            _countingAppender.ActivateOptions();

            _httpRequestAppender = new HttpRequestAppenderStub();
            _httpRequestAppender.AddAppender(_countingAppender);

            _httpRequestAppender.ClearFilters();
            _httpRequestAppender.Threshold = Level.All;
            _httpRequestAppender.Layout = new SimpleLayout();

            _httpRequestAppender.ActivateOptions();

            BasicConfigurator.Configure(_hierarchy, _httpRequestAppender);
        }