public ActiveLoggerFilterScope(string activeLogger)
        {
            ILoggerRepository repository = LogManager.GetRepository();

            repository.Threshold            = Level.All;
            repository.Properties[scopeKey] = activeLogger;

            foreach (IAppender appender in LogManager.GetRepository().GetAppenders())
            {
                AppenderSkeleton appenderSkeleton = appender as AppenderSkeleton;

                if (appenderSkeleton != null)
                {
                    // only inject ActiveLoggerFilter once
                    if (appenderSkeleton.FilterHead == null ||
                        appenderSkeleton.FilterHead.GetType() != typeof(ActiveLoggerFilter))
                    {
                        // inject ActiveLoggerFilter into the head of the filter list
                        IFilter filter = new ActiveLoggerFilter(scopeKey);
                        filter.ActivateOptions();
                        filter.Next = appenderSkeleton.FilterHead; // ???
                        appenderSkeleton.ClearFilters();           // ???
                        appenderSkeleton.AddFilter(filter);        // ???
                    }
                }
            }
        }
 private void RemoveAllFiltersFromAllAppenders()
 {
     foreach (IAppender appender in LogManager.GetRepository().GetAppenders())
     {
         AppenderSkeleton appenderSkeleton = appender as AppenderSkeleton;
         if (appenderSkeleton != null)
         {
             appenderSkeleton.ClearFilters();
         }
     }
 }