logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robbie Robinson <RobbieRobin...@m2-corp.com>
Subject How to apply layout to AsyncAppender?
Date Thu, 03 Jul 2008 17:40:09 GMT
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message