Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: logback-core
    • Labels:
      None

      Description

      Please implement AsyncAppender as in log4j.
      http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/AsyncAppender.html
      Some flaws noted in the log4j appender (I don't agree with silently throwing away log messages being default though)
      http://glueclue.blogspot.com/2007/01/log4j-asyncappender-is-not-always_31.html

      Referenced from #LBCLASSIC-20

      Thanks

        Activity

        Hide
        anders Anders Wallgren added a comment -

        I implemented AsyncAppender so we could migrate to logback here at Electric Cloud.

        We place this code in the public domain, so you may use it as you see fit.

        Show
        anders Anders Wallgren added a comment - I implemented AsyncAppender so we could migrate to logback here at Electric Cloud. We place this code in the public domain, so you may use it as you see fit.
        Hide
        lorantp Lóránt Pintér added a comment -

        Thanks for sharing.

        Maybe I'm missing something, but can't AsyncAppender be derived from UnsynchronizedAppenderBase?

        Show
        lorantp Lóránt Pintér added a comment - Thanks for sharing. Maybe I'm missing something, but can't AsyncAppender be derived from UnsynchronizedAppenderBase?
        Hide
        tjuerge Torsten Juergeleit added a comment - - edited

        I attached my take on a Logback-like implementation of log4js AsyncAppender to LBCLASSIC-177

        Show
        tjuerge Torsten Juergeleit added a comment - - edited I attached my take on a Logback-like implementation of log4js AsyncAppender to LBCLASSIC-177
        Hide
        noreply.ceki@qos.ch Ceki Gulcu added a comment -

        Logback will ship with AsyncAppender in release 1.0.4.

        Show
        noreply.ceki@qos.ch Ceki Gulcu added a comment - Logback will ship with AsyncAppender in release 1.0.4.
        Hide
        noreply.ceki@qos.ch Ceki Gulcu added a comment -

        Fixed in https://github.com/qos-ch/logback/commit/f495e50ba6

        Please review.

        From the docs: AsyncAppender buffers events in a BlockingQueue. A worker thread created by AsyncAppender takes events from the head of the queue, and dispatches them to the single appender attached to AsyncAppender. Note that by default, AsyncAppender will drop events of level TRACE, DEBUG and INFO if its queue is 80% full. This strategy has an amazingly favorable effect on performance at the cost of event loss. Event loss can be prevented by setting the discardingThreshold property to 0 (zero).

        Show
        noreply.ceki@qos.ch Ceki Gulcu added a comment - Fixed in https://github.com/qos-ch/logback/commit/f495e50ba6 Please review. From the docs: AsyncAppender buffers events in a BlockingQueue. A worker thread created by AsyncAppender takes events from the head of the queue, and dispatches them to the single appender attached to AsyncAppender. Note that by default, AsyncAppender will drop events of level TRACE, DEBUG and INFO if its queue is 80% full. This strategy has an amazingly favorable effect on performance at the cost of event loss. Event loss can be prevented by setting the discardingThreshold property to 0 (zero).

          People

          • Assignee:
            noreply.ceki@qos.ch Ceki Gulcu
            Reporter:
            cheenu Cheenu
          • Votes:
            7 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: