Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-206

FlushingPolicy

    XMLWordPrintable

Details

    • Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Icon: Major 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

        Activity

          People

            ceki Ceki Gülcü
            ceki Ceki Gülcü
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: