Details
-
Improvement
-
Resolution: Cannot Reproduce
-
Major
-
None
-
1.1.11
-
None
Description
The current AsyncAppender implementation blocks once the queue is full. In some situations the user would rather lose log messages than block on the log call. It would be very helpful to make this configurable.
My current workaround is to create a class that extends AsyncAppenderBase and overrides the append() method and calls blockingQueue.offer() instead of put().
Suggested solution:
- Add a configurable attribute such as discardWhenFull that defaults to false
- In AsyncAppenderBase.append() use blockingQueue.offer() if discardWhenFull is true
- Add some method of tracking how many events were dropped; a simple counter with public accessor should suffice