Thanks. So, is it any way to define a logger to works the same way as root logger does?
Carol Enderlin wrote: > > My answers below... > >> Why the root logger defined: >> <root> >> <level value="debug"/> >> <appender-ref ref="taskRedirection"/> >> <appender-ref ref="addQuestionSequenceOrder"/> >> </root> >> knows that all the logs from ALL the classes should go the the file >> specified by appenders:taskRedirection, addQuestionSequenceOrder > > That's the way it's supposed to work, root logger gets everything > unless you configure it not to. > >> and a logger: >> >> <logger >> name="curam.tools.upgradehelper.ieg.QuestionSequenceOrderConverter" >> additivity="true"> >> <level value="debug"/> >> <appender-ref ref="addQuestionSequenceOrder"/> >> </logger> >> knows that ONLY logs from that class >> curam.tools.upgradehelper.ieg.QuestionSequenceOrderConverter has to be >> "served"? > > That's the way that is supposed to work, too. You can get less > specific and get all classes in a package hierarchy to log to a > logger. Example: > > <logger name="curam.tools.upgradehelper" ... > > >> If not, why this parameter additivity="true" is present at all? It does >> nothing. >> > > additivity is true by default, so you are correct that setting > additivity="true" doesn't change the behavior. > > There is an excellent description of how additivity works in log4j > short manual http://logging.apache.org/log4j/1.2/manual.html > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/%22additivity%22-attribute-does-not-work-for-user-defined-logger-but-works-for-root-logger.-tp18259092p18275249.html Sent from the Log4j - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]