Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6286

Make request logging more Modular

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.1
    • Core
    • None
    • Unknown

    Description

      The current request logging is a bit complex as more and more features were added. I plan to redesign the logging to make it more modular.

      As this change is not compatible I will move the logging to a separate module and mark the request logging in core as deprecated. We can then remove it at a suitable time.

      The new logging design will implement the idea of a cxf LogEvent. This event will contain all relecvant details cxf can pull out of a request/response.

      A LogEventFactory will be reponsible to extract the meta data from a message and store it in the LogEvent.

      The logging interceptors will then mainly be responsible to extract the payload (which is the complicated part) and call the LogEventFactory to populate the meta data. They will then send the event to a LogEventSender.

      The LogEventSender will default to a slf4j based implementation which will create MDC values from the meta data. This will allow log4j appenders to work with the meta data in a convenient way.

      Users can also implement their own LogEventSenders and set them in the LoggingFeature. This allows to implement the logging in a completely different way while not having to care about the extraction of meta data or payload.

      Attachments

        Issue Links

          Activity

            People

              cschneider Christian Schneider
              cschneider Christian Schneider
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: