SocketAppender doesn't support a layout. log4j doesn't support the concept of inherited layouts, so you'll have to specify it for each appender that needs one.
Scott Deboy COMOTIV SYSTEMS 111 SW Columbia Street Ste. 950 Portland, OR 97201 Telephone: 503.224.7496 Cell: 503.997.1367 Fax: 503.222.0185 [EMAIL PROTECTED] www.comotivsystems.com -----Original Message----- From: Robbie Robinson [mailto:[EMAIL PROTECTED] Sent: Thu 7/3/2008 10:40 AM To: log4j-user@logging.apache.org Subject: How to apply layout to AsyncAppender? I have a scenario where I want to use multiple appenders for the same logger (FileAppender and SocketAppender for now). Both appenders need to format the message using the same layout. Instead of formatting the single message multiple times(in the FileAppender and in the SocketAppender), I was wanting to put both of these appenders under an AsyncAppender and apply the layout once in the AsyncAppender, then send the formatted message to my sub-appenders. What is the best way to accomplish this? From what I can tell the AsyncAppender does not support layouts. Thanks, Robbie
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]