Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-2130

AppenderRef 'level' vs 'ThresholdFilter'

    XMLWordPrintableJSON

Details

    • Question
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.10.0
    • None
    • Appenders
    • None

    Description

      Is there a significant difference between the following two configurations, i.e. are there certain elements to consider in choosing one over the other?
      1.

      <AppenderRef ref="out">
          <ThresholdFilter level="anyValidLevel"/>
      </AppenderRef>
      

      2.

      <AppenderRef ref="out" level="anyValidLevel"/>
      

      I looked at the class AppenderControl, and noticed that - to my surprise - shouldSkip() checks isFilteredByAppenderControl() before isFilteredByLevel().
      I also noticed both these methods are annotated with @PerformanceSensitive, but I don't know if any of this is relevant.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jvanheesch Joris van Heesch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: