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

Additive property always set to true

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Information Provided
    • 2.17.1
    • None
    • Core, Log4j 1.2 bridge
    • None
    • Important

    Description

      During upgrading log4j2 in grails 2.5.4 application, I removed all log4j 1.2.17 dependencies and added following dependencies pertaining to v2.17.1:

      • log4j-api
      • log4j-core
      • log4j-1.2-api
      • log4j-slf4j-impl

       

      Here's my log4j2.properties file present under conf directory:

      rootLogger.level = INFO
      rootLogger.additivity = false
      rootLogger.appenderRefs = stdout
      rootLogger.appenderRef.stdout.ref = STDOUT
      
      appender.console.type = Console
      appender.console.name = STDOUT
      appender.console.layout.type = PatternLayout
      appender.console.layout.pattern = %m%n
       

       

      I noticed that internal framework logs were also appearing and on further debugging I found that the additivity property for root logger was set to true (even when it is set to false in properties file). 

       

      I've posted a question with further details on stackoverflow.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jd-gen Jitin Dominic
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: