There are multiple solutions, a simpler one of which is below: - create 2 loggers, each hooked with a FileAppender. - have your component log to those separate loggers.
example config: log4j.rootLogger=DEBUG, log4j.logger.logger1=INFO,fileAppender1 log4j.logger.logger2=INFO,fileAppender2 log4j.appender.fileAppender1=org.apache.log4j.FileAppender log4j.appender.fileAppender1.File=file1.log log4j.appender.fileAppender2=org.apache.log4j.FileAppender log4j.appender.fileAppender2.File=file2.log -raghu -----Original Message----- From: Daly, Michael [mailto:[EMAIL PROTECTED]] Sent: Friday, July 19, 2002 4:55 PM To: '[EMAIL PROTECTED]' Subject: Logging to separate files I have two separate components running as part of a single app. Is there a way to have each component log to it's own log file? I have not been able to find an example of this in the docs but I think I saw it eluded to. If I have two separate apps running in the same JVM, how do I configure their logging configuration separately? Michael S. Daly MerckVaccines.com(TM) Merck & Co., Inc. MVD IS Mail: WP97-A369 Phone: 215-652-4735 Pager: 1-888-621-5636 Fax: 215-652-8846 E-mail: [EMAIL PROTECTED] ---------------------------------------------------------------------------- -- Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it. ============================================================================ == -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>