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

LoggingInInterceptor could not be extended / logs only once

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Information Provided
    • 3.4.0
    • None
    • JAX-WS Runtime, logging
    • None
    • Unknown

    Description

      Coming with CXF-8257 org.apache.cxf.ext.logging.LoggingInInterceptor will log a given message only once:

      public void handleMessage(Message message) throws Fault {
          if (isLoggingDisabledNow(message)) {
              return;
          } else {
              //ensure only logging once for a certain message
              //this can prevent message logging again when fault
              //happen after PRE_INVOKE phase(rewind calls into LoggingInFaultInterceptor)
              message.put(LIVE_LOGGING_PROP, Boolean.FALSE);
          }
      

      Filtering is done per message, not per Interceptor instance. We use a custom MyLoggingInInterceptor which subclasses the LoggingInInterceptor. (We Subclass in order to use different LogEventSender). So two distinct interceptor instances are applied to the Endpoint/Bus/Client but the message is logged only in the first invocation.

       

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ffang Freeman Yue Fang
            cachescrubber Lars Uffmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment