Camer38 skrev  den 03-07-2008 15:25:
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.
No. The logger frameworks do not do magic to deduce where logging should go. If you want for classes called to use a specific logger, you must pass it as an argument like all values you want to use.


Instead I got an log4j warning:
log4j:WARN No appenders could be found for logger
(curam.tools.upgradehelper.util.SQLStatements).
You are most likely using a logger variable in SQLStatements which has been defined at the top of that class referring to SQLStatments.class.

This does not allow log4j to distinguish between the two cases you have.

I have the same problem in a project where it is two threads logging in the same file. I have not yet found a good solution.
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>


This say that you want all messages at info level or higher to go to both the taskRedirection appender AND the addQuestionSequenceOrder appender.

--
 Thorbjørn

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to