Class LoggingFeature

  • All Implemented Interfaces:
    AbstractPortableFeature, Feature

    public class LoggingFeature
    extends DelegatingFeature<LoggingFeature.Portable>
    This class is used to control message-on-the-wire logging. By attaching this feature to an endpoint, you can specify logging. If this feature is present, an endpoint will log input and output of ordinary and log messages.
     
          
           
          
        
      ]]>
      
    • Constructor Detail

      • LoggingFeature

        public LoggingFeature()
    • Method Detail

      • setLimit

        public void setLimit​(int limit)
      • setInMemThreshold

        public void setInMemThreshold​(long inMemThreshold)
      • setPrettyLogging

        public void setPrettyLogging​(boolean prettyLogging)
      • setLogBinary

        public void setLogBinary​(boolean logBinary)
      • setLogMultipart

        public void setLogMultipart​(boolean logMultipart)
      • setVerbose

        public void setVerbose​(boolean verbose)
      • addInBinaryContentMediaTypes

        public void addInBinaryContentMediaTypes​(String mediaTypes)
        Add additional binary media types to the default values in the LoggingInInterceptor. Content for these types will not be logged. For example:
         <bean id="loggingFeature" class="org.apache.cxf.ext.logging.LoggingFeature">
           <property name="addInBinaryContentMediaTypes" value="audio/mpeg;application/zip"/>
         </bean>
         
        Parameters:
        mediaTypes - list of mediaTypes. symbol ; - delimeter
      • addOutBinaryContentMediaTypes

        public void addOutBinaryContentMediaTypes​(String mediaTypes)
        Add additional binary media types to the default values in the LoggingOutInterceptor. Content for these types will not be logged. For example:
         <bean id="loggingFeature" class="org.apache.cxf.ext.logging.LoggingFeature">
           <property name="addOutBinaryContentMediaTypes" value="audio/mpeg;application/zip"/>
         </bean>
         
        Parameters:
        mediaTypes - list of mediaTypes. symbol ; - delimeter
      • addBinaryContentMediaTypes

        public void addBinaryContentMediaTypes​(String mediaTypes)
        Add additional binary media types to the default values for both logging interceptors Content for these types will not be logged. For example:
         <bean id="loggingFeature" class="org.apache.cxf.ext.logging.LoggingFeature">
           <property name="addBinaryContentMediaTypes" value="audio/mpeg;application/zip"/>
         </bean>
         
        Parameters:
        mediaTypes - list of mediaTypes. symbol ; - delimeter
      • setSensitiveElementNames

        public void setSensitiveElementNames​(Set<String> sensitiveElementNames)
        Sets list of XML or JSON elements containing sensitive information to be masked. Corresponded data will be replaced with configured mask For example:
         sensitiveElementNames: {password}
        
         Initial logging statement: my usermy secret password
         Result logging statement: my userXXXX
         
        Parameters:
        sensitiveElementNames - set of sensitive element names to be replaced
      • addSensitiveElementNames

        public void addSensitiveElementNames​(Set<String> sensitiveElementNames)
        Adds list of XML or JSON elements containing sensitive information to be masked. Corresponded data will be replaced with configured mask For example:
         sensitiveElementNames: {password}
        
         Initial logging statement: my usermy secret password
         Result logging statement: my userXXXX
         
        Parameters:
        sensitiveElementNames - set of sensitive element names to be replaced
      • setSensitiveProtocolHeaderNames

        public void setSensitiveProtocolHeaderNames​(Set<String> sensitiveProtocolHeaderNames)
        Sets list of protocol headers containing sensitive information to be masked. Corresponded data will be replaced with configured mask For example:
         sensitiveHeaders: {Authorization}
        
         Initial logging statement: {Authorization=Basic QWxhZGRpbjpPcGVuU2VzYW1l}
         Result logging statement: {Authorization=XXX}
         
        Parameters:
        sensitiveProtocolHeaderNames - set of sensitive element names to be replaced
      • addSensitiveProtocolHeaderNames

        public void addSensitiveProtocolHeaderNames​(Set<String> sensitiveProtocolHeaderNames)
        Adds list of protocol headers containing sensitive information to be masked. Corresponded data will be replaced with configured mask For example:
         sensitiveHeaders: {Authorization}
        
         Initial logging statement: {Authorization=Basic QWxhZGRpbjpPcGVuU2VzYW1l}
         Result logging statement: {Authorization=XXX}
         
        Parameters:
        sensitiveProtocolHeaderNames - set of sensitive element names to be replaced