If the v1 config is anything like the v2 config, then you only need additivity="false" on the logger element (in this case, the <category/> element). The appender-ref element has nothing to do with additivity.
On 22 March 2017 at 12:26, bmelloni <bruno.mell...@chickasaw.net> wrote: > I thought I understood additivity, but apparently I don't. I am using > log4j-1.2.17.jar. > > After getting a bunch errors like the one in the subject I kept adding > additivity tags, but nothing stopped the errors. > > What is the correct syntax to send the packages (and subpackages/classes) > that have appender-ref to the specified appenders *and nothing more*, while > stopping the error? > > My log4j.xml looks like: > <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" > debug="false"> > <appender name="FILE" > class="net.cndc.log4j.appender.CndcDateRollingFileAppender"> > ... > <appender name="STARTSTOP" > class="net.cndc.log4j.appender.CndcDateRollingFileAppender"> > ... > <appender name="FILEMOVER" > class="net.cndc.log4j.appender.CndcDateRollingFileAppender"> > ... > <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> > ... > ... various categories like: ... > <category name="net.cndc"> > <priority value="DEBUG"/> > </category> > ... > <category name="net.cndc.filemover" additivity="false"> > <priority value="INFO"/> > <appender-ref ref="FILEMOVER" additivity="false"/> > </category> > <category > name="net.cndc.scheduler.common.controller.CndcSchedulerServiceImpl" > additivity="false"> > <priority value="INFO"/> > <appender-ref ref="STARTSTOP" additivity="false"/> > </category> > ... > <root> > <appender-ref ref="CONSOLE" additivity="true"/> > <appender-ref ref="FILE" additivity="true"/> > </root> > </log4j:configuration> > > > > > -- > View this message in context: http://apache-logging.6191.n7. > nabble.com/log4j-WARN-Attribute-additivity-must-be- > declared-for-element-type-appender-ref-tp75234.html > Sent from the Log4j - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > > -- Matt Sicker <boa...@gmail.com>