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

documentation error regarding additivity default value

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.2
    • Fix Version/s: 2.9.0
    • Component/s: Documentation
    • Labels:

      Description

      On this page: https://logging.apache.org/log4j/2.x/manual/configuration.html
      There is the following sentence:

      "The additivity attribute may be assigned a value of true or false. If the attribute is omitted the default value of false will be used."

      Additivity controls the inheritance of appenders from parent loggers, correct? There are examples in the documentation that say will you will get duplicate logging if you don't set additivity to false (if you are setting the same appender at the root and on the logger). That implies that the default additivity is true, which would be consistent with logback, log4j, etc.

        Activity

        Hide
        jvz Matt Sicker added a comment -

        The only reason you'd get duplicate logging without overriding additivity is when you specify appender-ref on multiple loggers. The default value is true, though, so good catch.

        Show
        jvz Matt Sicker added a comment - The only reason you'd get duplicate logging without overriding additivity is when you specify appender-ref on multiple loggers. The default value is true, though, so good catch.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit b5640d9edd471bbfba4d9e90ded958db9ce76b95 in logging-log4j2's branch refs/heads/master from Matt Sicker
        [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=b5640d9 ]

        LOG4J2-1885: Fix docs about additivity

        Show
        jira-bot ASF subversion and git services added a comment - Commit b5640d9edd471bbfba4d9e90ded958db9ce76b95 in logging-log4j2's branch refs/heads/master from Matt Sicker [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=b5640d9 ] LOG4J2-1885 : Fix docs about additivity
        Hide
        jvz Matt Sicker added a comment -

        Fixed in master. Please verify and close.

        Show
        jvz Matt Sicker added a comment - Fixed in master. Please verify and close.

          People

          • Assignee:
            jvz Matt Sicker
            Reporter:
            hdeadman Hal Deadman
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development