I have two Java classes that used log4j. curam.tools.upgradehelper.ieg.QuestionSequenceOrderConverter and curam.tools.upgradehelper.taskredirection.TaskRedirectionConverter
Both classes from above uses different class: curam.tools.upgradehelper.util.SQLStatements where a logger in each of the class with defined in following pattern: private static final Logger log = Logger.getLogger(NameOfTheClass.class); Next I have defined log4j.xml. I want to have a full log file in two separate files for both classes. curam.tools.upgradehelper.ieg.QuestionSequenceOrderConverter in QuestionSequenceOrderConverterTool.log curam.tools.upgradehelper.taskredirection.TaskRedirectionConverter in TaskRedirectionConverterTool.log I did a following: I have not defined root at all. My assumption was that if I run one of the class curam.tools.upgradehelper.ieg.QuestionSequenceOrderConverter I would got all the logs from that class and all the classes used internally by curam.tools.upgradehelper.ieg.QuestionSequenceOrderConverter in the addQuestionSequenceOrderTool.log. Instead I got an log4j warning: log4j:WARN No appenders could be found for logger (curam.tools.upgradehelper.util.SQLStatements). What is the meaning of the attribute "additivity" for each logger? Why don't I get all the logs in one file? During my testing I have defined a root logger as well, but it does not do what I want. All the expected lines are present in both files but the files are populated with the log from the same class. <root> <level value="info"/> <appender-ref ref="taskRedirection"/> <appender-ref ref="addQuestionSequenceOrder"/> </root> I use log4j-1.2.15.jar Could anybody help me with defining a correct log4j.xml file? -- View this message in context: http://www.nabble.com/%22additivity%22-attribute-does-not-work-for-user-defined-logger-but-works-for-root-logger.-tp18259092p18259092.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]