public abstract class AbstractLoggingInterceptor extends AbstractPhaseInterceptor<Message>
Modifier and Type | Field and Description |
---|---|
protected static String |
BINARY_CONTENT_MESSAGE |
static int |
DEFAULT_LIMIT |
protected int |
limit |
protected boolean |
prettyLogging |
protected long |
threshold |
protected PrintWriter |
writer |
Constructor and Description |
---|
AbstractLoggingInterceptor(String phase) |
AbstractLoggingInterceptor(String id,
String phase) |
Modifier and Type | Method and Description |
---|---|
long |
getInMemThreshold() |
int |
getLimit() |
protected abstract Logger |
getLogger() |
PrintWriter |
getPrintWriter() |
boolean |
isBinaryContent(String contentType) |
boolean |
isPrettyLogging() |
boolean |
isShowBinaryContent() |
protected void |
log(Logger logger,
String message) |
void |
setInMemThreshold(long t) |
void |
setLimit(int lim) |
void |
setOutputLocation(String s) |
void |
setPrettyLogging(boolean flag) |
void |
setPrintWriter(PrintWriter w) |
void |
setShowBinaryContent(boolean showBinaryContent) |
protected String |
transform(String originalLogString)
Transform the string before display.
|
protected void |
writePayload(StringBuilder builder,
CachedOutputStream cos,
String encoding,
String contentType) |
protected void |
writePayload(StringBuilder builder,
StringWriter stringWriter,
String contentType) |
addAfter, addAfter, addBefore, addBefore, getAdditionalInterceptors, getAfter, getBefore, getId, getPhase, handleFault, isGET, isRequestor, setAfter, setBefore
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleMessage
public static final int DEFAULT_LIMIT
protected static final String BINARY_CONTENT_MESSAGE
protected int limit
protected long threshold
protected PrintWriter writer
protected boolean prettyLogging
public AbstractLoggingInterceptor(String phase)
protected abstract Logger getLogger()
public void setOutputLocation(String s)
public void setPrintWriter(PrintWriter w)
public PrintWriter getPrintWriter()
public void setLimit(int lim)
public int getLimit()
public void setPrettyLogging(boolean flag)
public boolean isPrettyLogging()
public void setInMemThreshold(long t)
public long getInMemThreshold()
protected void writePayload(StringBuilder builder, CachedOutputStream cos, String encoding, String contentType) throws Exception
Exception
protected void writePayload(StringBuilder builder, StringWriter stringWriter, String contentType) throws Exception
Exception
protected String transform(String originalLogString)
originalLogString
- the raw log message.public void setShowBinaryContent(boolean showBinaryContent)
public boolean isShowBinaryContent()
public boolean isBinaryContent(String contentType)
Apache CXF