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

There is no way to know how many events are discarded by AsyncAppender

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.3
    • Fix Version/s: 1.3.0-alpha6
    • Component/s: logback-classic
    • Labels:
      None

      Description

      ch.qos.logback.classic.AsyncAppender's append() method will discard events if both isQueueBelowDiscardingThreshold() and isDiscardable(eventObject) are true, which is reasonable and documented behaviour, but there is no way for the user to track the level at which this is occurring.

      It's not easy to address this problem by extending AsyncAppender, as isQueueBelowDiscardingThreshold() is private and depends on private values. Making isQueueBelowDiscardingThreshold() protected/public rather than private would help here (see https://github.com/qos-ch/logback/pull/325 for a submitted PR by another user to do this) , or alternatively directly building-in some kind of counter of discarded events would be another way.

       

        Attachments

          Activity

            People

            • Assignee:
              logback-dev Logback dev list
              Reporter:
              rtyley Roberto Tyley
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: