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

Logging twice in case of faults happening after pre-stream phase in out-chain

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.5.6, 3.6.1, 4.0.2
    • 3.5.7, 3.6.2, 4.0.3
    • logging
    • None
    • CXF server implementation using LoggingOutInterceptor on both out chain and out fault chain (e.g. through LoggingFeature).

    • Unknown

    Description

      When using the LoggingOutInterceptor in a server context with the interceptor added to the Out Chain and the Out Fault Chain events will be created and sent twice if faults occur after the phase the LoggingOutIntercept is bound to.

      The cause of the issue is that handleMessage is called twice; once during the out chain and once during the out fault chain. This wraps the message content OutputStream twice in LoggingOutputStreams and adds two callbacks both creating logging events and sending them to the LogEventSender.

      When combined with the StaxOutInterceptor it furthermore causes one of the events to have an empty payload. This is due to the StaxOutInterceptor wrapping the LoggingOutputStream created during the out chain, and not the LoggingOutputStream created during the out fault chain. Meaning content is only written to the inner LoggingOutputStream and not to the outer one.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Hillerøe Silwing
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: