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

LoggingFeature documentation example invalid

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 3.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Centos 7.5, Fuse 7, (cxf 3.1.11), and slf/log4j2.

       

       

    • Estimated Complexity:
      Unknown

      Description

       

      Upgraded logging interceptors, as started using CXF 3.1, to use the "features":

      <jaxws:endpoint ...>
        <jaxws:features>
         <bean class="org.apache.cxf.ext.logging.LoggingFeature"/>
        </jaxws:features>
      </jaxws:endpoint>

      as per http://cxf.apache.org/docs/message-logging.html

       

      This didn't work. "Outbound Message" and "Inbound Message" logs no longer appear.

       

       I added the dependency containing the "ext" version in my pom.xml:

      <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-features-logging</artifactId>
      </dependency>

       

      Another user seems to have the same problem on SO:

      https://stackoverflow.com/questions/55050636/apache-cxf-3-2-7-loggingfeature-configuration

      Another user had a similar problem:

      https://stackoverflow.com/questions/54989929/apache-cxf-loggingininterceptor-is-deprecated-what-to-use-instead

      Answer suggested the user still make use of the interceptors, but in the new package: org.apache.cxf.ext.logging.LoggingInInterceptor - but adding that didn't help either.

       

      <jaxws:client id="AuthRequest" serviceClass="com.PortType" address="${url}" username="${userName}" password="${password}">

         <jaxws:features>
            <bean id="loggingFeature" class="org.apache.cxf.ext.logging.LoggingFeature">
               <property name="prettyLogging" value="true" />
            </bean>
         </jaxws:features>

         <jaxws:inInterceptors>
            <bean id="loggingInInterceptor" class="org.apache.cxf.ext.logging.LoggingInInterceptor">
               <property name="prettyLogging" value="true" />
            </bean>
         </jaxws:inInterceptors>

         <jaxws:outInterceptors>
            <bean id="loggingOutInterceptor" class="org.apache.cxf.ext.logging.LoggingOutInterceptor">
               <property name="prettyLogging" value="true" />
            </bean>
         </jaxws:outInterceptors>

      </jaxws:client>

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              djbza Daniel Brownell
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: