Details
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.