If I understand you correctly, you want to have several loggers all using the same appender?
Use the hierarchical approach of the logger repository by prefixing your logger names: <logger name="loggerFamily1.Test1"> <level value="info"/> </logger> <logger name="loggerFamily1.Test2"> <level value="warn"/> </logger> <logger name="loggerFamily1" additivity="false"> <appender-ref ref="MultiplexingAppender1" /> </logger> .... more loggers for family2 <logger name="loggerFamily2" additivity="false"> <appender-ref ref="MultiplexingAppender2" /> </logger> Like this all loggers of loggerFamily1 write to the appender MultiplexingAppender1, but on different log-levels, and all loggers of loggerFamily2 write to appender MultiplexingAppender2. Heri -----Original Message----- From: Mohan.Radhakrishnan [mailto:moh...@fss.co.in] Sent: Thursday, April 08, 2010 9:55 AM To: log4j-user@logging.apache.org Subject: [SCL-2] Re: Multiple log files, multiple logger names and the same appender Hopefully more explanation can attract some ideas here. I am using XML configuration and a custom appender. So I have one section in the XML corresponding to one logger name and one log file. So for each different logger name, log file and the same custom appender I need to add one more section in log4j.xml Is there a way to parameterize the logger section and the log file so that one section can substitute for multiple sections ? The same appender is used for all sections. -- View this message in context: http://old.nabble.com/Multiple-log-files%2C-multiple-logger-names-and-the-same-appender-tp28024737p28175329.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 --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org