Hi Matt,

On Mon, 5 Feb 2024 at 22:37, Matt Sicker <m...@musigma.org> wrote:
>
> For #3, I agree that we should perform formatting on the application thread 
> before transferring control to an asynchronous thread.

I am not sure if we always need to format the message (the
`log4j2.formatMsgAsync` property and and the
`@AsynchronouslyFormattable` on a message class might still be
useful), but for simplicity I would do it in a single place, just
before appending a log event to a queue or ring buffer.

Whether or not format messages synchronously should probably be
configurable (even for `@AsynchronouslyFormattable`): this speeds up
enabled loggers considerably (we might even think about pre-formatting
events), but slows down disabled loggers.

Piotr

Reply via email to