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

Provide interface with method prepareForDeferredProcessing()

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None
    • None

    Description

      Currently both logback event classes (LoggingEvent and AccessEvent) are implementing the method prepareForDeferredProcessing(). To allow calling this method for both event types from within a logback-core appender (e.g. the one suggested in LBCLASSIC-177) this method has to be defined within a logback-core interface.

      Additionally the method prepareForDeferredProcessing() should support two behaviors:
      1) preparing only the "cheap" stuff like thread name or MDC
      2) preparing everything including the "expensive" stuff like caller data -> this would solve LBCLASSIC-175

      So how about defining an interface like the following?

      package ch.qos.logback.core.spi;

      public interface Event

      { void prepareForDeferredProcessing(boolean doFullPreparation); }

      Maybe the method getTimeStamp() implemented by both event types could be part of this interface as well.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            tjuerge Torsten Juergeleit
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: