Package org.apache.cxf.ext.logging
Class AbstractLoggingInterceptor
- java.lang.Object
-
- org.apache.cxf.phase.AbstractPhaseInterceptor<Message>
-
- org.apache.cxf.ext.logging.AbstractLoggingInterceptor
-
- All Implemented Interfaces:
Interceptor<Message>,PhaseInterceptor<Message>
- Direct Known Subclasses:
LoggingInInterceptor,LoggingOutInterceptor
public abstract class AbstractLoggingInterceptor extends AbstractPhaseInterceptor<Message>
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONTENT_SUPPRESSEDstatic intDEFAULT_LIMITstatic intDEFAULT_THRESHOLDprotected DefaultLogEventMappereventMapperprotected intlimitprotected static StringLIVE_LOGGING_PROPprotected booleanlogBinaryprotected booleanlogMultipartprotected MaskSensitiveHelpermaskSensitiveHelperprotected LogEventSendersenderprotected Set<String>sensitiveProtocolHeaderNamesprotected longthreshold
-
Constructor Summary
Constructors Constructor Description AbstractLoggingInterceptor(String phase, LogEventSender sender)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBinaryContentMediaTypes(String mediaTypes)voidaddSensitiveElementNames(Set<String> sensitiveElementNames)voidaddSensitiveProtocolHeaderNames(Set<String> protocolHeaderNames)voidcreateExchangeId(Message message)longgetInMemThreshold()intgetLimit()protected static booleanisLoggingDisabledNow(Message message)protected StringmaskSensitiveElements(Message message, String originalLogString)voidsetInMemThreshold(long t)voidsetLimit(int lim)voidsetLogBinary(boolean logBinary)voidsetLogMultipart(boolean logMultipart)voidsetPrettyLogging(boolean prettyLogging)voidsetSensitiveElementNames(Set<String> sensitiveElementNames)voidsetSensitiveProtocolHeaderNames(Set<String> protocolHeaderNames)protected booleanshouldLogContent(LogEvent event)protected StringstripBinaryParts(LogEvent event, String originalLogString)protected Stringtransform(Message message, String originalLogString)-
Methods inherited from class org.apache.cxf.phase.AbstractPhaseInterceptor
addAfter, addAfter, addBefore, addBefore, getAdditionalInterceptors, getAfter, getBefore, getId, getPhase, handleFault, isGET, isRequestor, setAfter, setBefore
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cxf.interceptor.Interceptor
handleMessage
-
-
-
-
Field Detail
-
DEFAULT_LIMIT
public static final int DEFAULT_LIMIT
- See Also:
- Constant Field Values
-
DEFAULT_THRESHOLD
public static final int DEFAULT_THRESHOLD
- See Also:
- Constant Field Values
-
CONTENT_SUPPRESSED
public static final String CONTENT_SUPPRESSED
- See Also:
- Constant Field Values
-
LIVE_LOGGING_PROP
protected static final String LIVE_LOGGING_PROP
- See Also:
- Constant Field Values
-
limit
protected int limit
-
threshold
protected long threshold
-
logBinary
protected boolean logBinary
-
logMultipart
protected boolean logMultipart
-
sender
protected LogEventSender sender
-
eventMapper
protected final DefaultLogEventMapper eventMapper
-
maskSensitiveHelper
protected final MaskSensitiveHelper maskSensitiveHelper
-
-
Constructor Detail
-
AbstractLoggingInterceptor
public AbstractLoggingInterceptor(String phase, LogEventSender sender)
-
-
Method Detail
-
isLoggingDisabledNow
protected static boolean isLoggingDisabledNow(Message message) throws Fault
- Throws:
Fault
-
addBinaryContentMediaTypes
public void addBinaryContentMediaTypes(String mediaTypes)
-
setLimit
public void setLimit(int lim)
-
getLimit
public int getLimit()
-
setInMemThreshold
public void setInMemThreshold(long t)
-
getInMemThreshold
public long getInMemThreshold()
-
setSensitiveProtocolHeaderNames
public void setSensitiveProtocolHeaderNames(Set<String> protocolHeaderNames)
-
addSensitiveProtocolHeaderNames
public void addSensitiveProtocolHeaderNames(Set<String> protocolHeaderNames)
-
setPrettyLogging
public void setPrettyLogging(boolean prettyLogging)
-
shouldLogContent
protected boolean shouldLogContent(LogEvent event)
-
setLogBinary
public void setLogBinary(boolean logBinary)
-
setLogMultipart
public void setLogMultipart(boolean logMultipart)
-
createExchangeId
public void createExchangeId(Message message)
-
maskSensitiveElements
protected String maskSensitiveElements(Message message, String originalLogString)
-
-