org.apache.cxf.interceptor
Class AbstractLoggingInterceptor
java.lang.Object
org.apache.cxf.phase.AbstractPhaseInterceptor<Message>
org.apache.cxf.interceptor.AbstractLoggingInterceptor
- All Implemented Interfaces:
- Interceptor<Message>, PhaseInterceptor<Message>
- Direct Known Subclasses:
- LoggingInInterceptor, LoggingOutInterceptor
public abstract class AbstractLoggingInterceptor
- extends AbstractPhaseInterceptor<Message>
A simple logging handler which outputs the bytes of the message to the
Logger.
|
Field Summary |
protected int |
limit
|
protected static java.util.logging.Logger |
LOG
|
protected boolean |
prettyLogging
|
protected java.io.PrintWriter |
writer
|
| Methods inherited from class org.apache.cxf.phase.AbstractPhaseInterceptor |
addAfter, addAfter, addBefore, addBefore, 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 |
LOG
protected static final java.util.logging.Logger LOG
limit
protected int limit
writer
protected java.io.PrintWriter writer
prettyLogging
protected boolean prettyLogging
AbstractLoggingInterceptor
public AbstractLoggingInterceptor(java.lang.String phase)
setOutputLocation
public void setOutputLocation(java.lang.String s)
setPrintWriter
public void setPrintWriter(java.io.PrintWriter w)
getPrintWriter
public java.io.PrintWriter getPrintWriter()
setLimit
public void setLimit(int lim)
getLimit
public int getLimit()
setPrettyLogging
public void setPrettyLogging(boolean flag)
isPrettyLogging
public boolean isPrettyLogging()
writePayload
protected void writePayload(java.lang.StringBuilder builder,
CachedOutputStream cos,
java.lang.String encoding,
java.lang.String contentType)
throws java.lang.Exception
- Throws:
java.lang.Exception
transform
protected java.lang.String transform(java.lang.String originalLogString)
- Transform the string before display. The implementation in this class
does nothing. Override this method if you want to change the contents of the
logged message before it is delivered to the output.
For example, you can use this to mask out sensitive information.
- Parameters:
originalLogString - the raw log message.
- Returns:
- transformed data
log
protected void log(java.lang.String message)
Apache CXF