public OutputWindowPaneAppender(EnvDTE.OutputWindowPane outputWindowPane, Level maxLevel)
        {
            this.outputWindowPane = outputWindowPane;

            LevelRangeFilter filter = new LevelRangeFilter();
            filter.LevelMin = maxLevel;
            base.AddFilter(filter);

            PatternLayout layout = new PatternLayout();
            if (maxLevel.CompareTo(Level.Debug) <= 0)
            {
                layout.ConversionPattern = "%date %-5level %logger - %message%newline";
            }
            else
            {
                layout.ConversionPattern = "[%level] %message%newline";
            }
            layout.ActivateOptions();
            base.Layout = layout;
        }
Example #2
0
 internal bool IsEnabledFor(Level level)
 {
     return level == null ? true : (this.detailThresholdRich == null || level.CompareTo(this.detailThresholdRich) > 0);
 }