Robbie Robinson | 3 Jul 19:36

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


Gmane