Details
-
New Feature
-
Resolution: Won't Fix
-
Major
-
None
-
None
-
None
-
None
Description
Let flushing be a settable policy of WriteAppender. Thus, the user would be able to set the FlushingPolicy of a WriterAppender or any
derived class which would allow you to flush the underlying output stream according to any criteria available to the shouldFlush() method
(see below), including time.
Here is the relevant interface:
interface FlushingPolicy {
booelan shouldFlush(LoggingEvent e);
}
We could easily imagine a policy flushing on every warning or error in addition to special markers. For example,
Marker FLUSH = MarkerFactory.getMarker("FLUSH");
logger.info(FLUSH, "finished serving request {}", request.getId());
Attachments
Issue Links
- is duplicated by
-
LOGBACK-271 introduce FlushableAppender
- Resolved