I have set up my log4j.properties as follows:
log4j.rootCategory=INFO, log
log4j.appender.log=org.apache.log4j.RollingFileAppender
log4j.appender.log.File=test.log
log4j.appender.log.layout.ConversionPattern=%-25d %p %-40.40c{1} %3x - %m%n
log4j.appender.log.layout=org.apache.log4j.PatternLayout
log4j.appender.log.Append=false
log4j.appender.log.MaxFileSize=10MB
log4j.appender.log.MaxBackupIndex=1
log4j.category.com.mycompany.mypackage=DEBUG, log
log4j.additive.com.mycompany.mypackage=false
My intention was to ensure that all categories wold at least log INFO, WARN, ERROR and FATAL..
When debugging a category like com.mycopmany.mypackage, I simply add the last two lines to enable the DEBUG.
When I run this configuration I get double entries for any logging coming from the com.mycompany.mypackage category.
I was under the impression that by specifying the additive option as false, then the category wouldn't inherit logging to any appenders specified for parentfrom parent categories.
What am I doing wrong?