Package org.apache.cxf.ext.logging
Class LoggingFeature
java.lang.Object
jakarta.xml.ws.WebServiceFeature
org.apache.cxf.feature.AbstractFeature
org.apache.cxf.feature.DelegatingFeature<LoggingFeature.Portable>
org.apache.cxf.ext.logging.LoggingFeature
- All Implemented Interfaces:
org.apache.cxf.feature.AbstractPortableFeature,org.apache.cxf.feature.Feature
public class LoggingFeature
extends org.apache.cxf.feature.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.
<![CDATA[
<jaxws:endpoint ...>
<jaxws:features>
</jaxws:features>
</jaxws:endpoint>
]]>
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.apache.cxf.feature.DelegatingFeature
delegateFields inherited from class jakarta.xml.ws.WebServiceFeature
enabled -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBinaryContentMediaTypes(String mediaTypes) Add additional binary media types to the default values for both logging interceptors Content for these types will not be logged.voidaddInBinaryContentMediaTypes(String mediaTypes) Add additional binary media types to the default values in the LoggingInInterceptor.voidaddOutBinaryContentMediaTypes(String mediaTypes) Add additional binary media types to the default values in the LoggingOutInterceptor.voidaddSensitiveElementNames(Set<String> sensitiveElementNames) Adds list of XML or JSON elements containing sensitive information to be masked.voidaddSensitiveProtocolHeaderNames(Set<String> sensitiveProtocolHeaderNames) Adds list of protocol headers containing sensitive information to be masked.voidsetInMemThreshold(long inMemThreshold) voidvoidsetLimit(int limit) voidsetLogBinary(boolean logBinary) voidsetLogMultipart(boolean logMultipart) voidvoidsetPrettyLogging(boolean prettyLogging) voidsetSender(LogEventSender sender) voidsetSensitiveDataHelper(MaskSensitiveHelper maskSensitiveHelper) Replaces MaskSensitiveHelper implementation with given one.voidsetSensitiveElementNames(Set<String> sensitiveElementNames) Sets list of XML or JSON elements containing sensitive information to be masked.voidsetSensitiveProtocolHeaderNames(Set<String> sensitiveProtocolHeaderNames) Sets list of protocol headers containing sensitive information to be masked.voidsetVerbose(boolean verbose) Methods inherited from class org.apache.cxf.feature.DelegatingFeature
getDelegate, initialize, initialize, initialize, initialize, initializeProvider, setDelegateMethods inherited from class org.apache.cxf.feature.AbstractFeature
doInitializeProvider, getActive, getID, isEnabled
-
Constructor Details
-
LoggingFeature
public LoggingFeature()
-
-
Method Details
-
setLimit
public void setLimit(int limit) -
setInMemThreshold
public void setInMemThreshold(long inMemThreshold) -
setSender
-
setInSender
-
setOutSender
-
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
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
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
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
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 user my secret password Result logging statement:my user XXXX - Parameters:
sensitiveElementNames- set of sensitive element names to be replaced
-
addSensitiveElementNames
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 user my secret password Result logging statement:my user XXXX - Parameters:
sensitiveElementNames- set of sensitive element names to be replaced
-
setSensitiveProtocolHeaderNames
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
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
-
setSensitiveDataHelper
Replaces MaskSensitiveHelper implementation with given one.- Parameters:
maskSensitiveHelper- new MaskSensitiveHelper to be used.
-