Absolutely, we already have a "discard" policy that works great! There are certain types of events that I don't wish to throw away, even under very heavy load.
See https://logging.apache.org/log4j/2.x/manual/configuration.html#asyncQueueFullPolicy -ck On Fri, May 17, 2019, at 15:02, Gary Gregory wrote: > Would it make sense to have an optional "drop events on the floor" policy > when things get busy? > > Gary > > On Fri, May 17, 2019, 14:52 Carter Kozak <cko...@ckozak.net> wrote: > > > Hi friends, > > > > I've filed LOG4J2-2606 after tracking down the issue in prod. It's > > frightening because the result was instability across entire box due to CPU > > starvation, caused by a full logging queue from heavy load. I'm curious if > > anyone else has run into this behavior. We may want to change the default > > policy to use the synchronous route rather than enqueue. This would allow > > for contention in other places, and allow certain threadlocals to be > > initialized on application threads rather than being confined to the > > background thread, however we already account for this when running in > > synchronous mode and the current failure is pretty nasty. > > > > Thoughts or concerns? > > > > https://issues.apache.org/jira/browse/LOG4J2-2606 > > > > Thanks, > > -ck > > >