![]() |
Does "additivity" flag in log4j.properties work only with log4j or with Apache Commons Logging as well?
In a java class I created a (simplified) logger as follows:
package aaa; .... import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class bbb { ..... private final Log log = LogFactory.getLog(getClass()); // or private final Log log = LogFactory.getLog("aaa.bbb"); log.info("hello"); } In the log4j.properties I defined: log4j.rootLogger=INFO, console, logfile log4j.additivity.aaa.bbb=false log4j.additivity.aaa=false log4j.appender.aaa.bbb=org.apache.log4j.RollingFil eAppender log4j.appender.aaa.bbb=C:/logs/mylog.txt ...... Unfortunately the log output goes always to all appenders from RootLogger and not to the special logfile for my particular module. Why? Does the additivity flag apply only to pure log4j Loggers rather than Apache Commons Logging? Gianni |
| All times are GMT. The time now is 05:17 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.