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

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

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 1.5.7
    • 1.2.3
    • logback-classic
    • 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

            ceki Ceki Gülcü
            rtyley Roberto Tyley
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: