Hi, I have the following config:
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="reportFileAppender" class="org.apache.log4j.RollingFileAppender"> <!-- Keep one backup file --> <layout class="org.apache.log4j.PatternLayout"> </layout> </appender> <appender name="stdoutAppender" class="org.apache.log4j.ConsoleAppender"> <layout class="org.apache.log4j.PatternLayout"> </layout> </appender> <logger name="db_report"> <level value="info" /> <appender-ref ref="reportFileAppender"/> </logger> <logger name="com.mycompany"> <level value="info" /> </logger> <root> <priority value="warn"/> <appender-ref ref="stdoutAppender"/> </root> </log4j:configuration> In the source I do: private static Logger reportLogger = Logger.getLogger("db_report"); and in other classes I do: private static Logger anyClassLogger = Logger.getLogger(com.mycompany.MyClass.class); I would like things logged to the db_report not to be logged in the stdoutAppender, but I can't get them out of there, since the root logger has it and it seems it catches all... how can I log things to the report.log file without it being outputted to the stdout as well? thanks -- View this message in context: http://www.nabble.com/Logging-without-logging-to-the-root-logger-tp25997550p25997550.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