You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Jitin Dominic (Jira)" <ji...@apache.org> on 2022/01/19 17:33:00 UTC

[jira] [Updated] (LOG4J2-3353) Additive property always set to true

     [ https://issues.apache.org/jira/browse/LOG4J2-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jitin Dominic updated LOG4J2-3353:
----------------------------------
    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:
{code:java}
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
 {code}
 

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|https://stackoverflow.com/questions/70741835/internal-grails-logs-appearing-after-log4j2-upgrade].

  was:
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:
{code:java}
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
 {code}
 

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.


> Additive property always set to true
> ------------------------------------
>
>                 Key: LOG4J2-3353
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3353
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core, Log4j 1.2 bridge
>    Affects Versions: 2.17.1
>         Environment: [stackoverflow|https://stackoverflow.com/questions/70741835/internal-grails-logs-appearing-after-log4j2-upgrade]
>            Reporter: Jitin Dominic
>            Priority: Major
>
> 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:
> {code:java}
> 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
>  {code}
>  
> 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|https://stackoverflow.com/questions/70741835/internal-grails-logs-appearing-after-log4j2-upgrade].



--
This message was sent by Atlassian Jira
(v8.20.1#820001)