public class DefaultExchangeFormatter extends Object implements ExchangeFormatter
ExchangeFormatter
that have fine grained options to configure what to include in the output.Modifier and Type | Class and Description |
---|---|
static class |
DefaultExchangeFormatter.OutputStyle |
Constructor and Description |
---|
DefaultExchangeFormatter() |
Modifier and Type | Method and Description |
---|---|
String |
format(Exchange exchange)
Generates a string representation of the exchange
|
protected String |
getBodyAsString(Message message) |
protected String |
getBodyTypeAsString(Message message) |
int |
getMaxChars() |
DefaultExchangeFormatter.OutputStyle |
getStyle() |
boolean |
isMultiline() |
boolean |
isShowAll() |
boolean |
isShowBody() |
boolean |
isShowBodyType() |
boolean |
isShowCaughtException() |
boolean |
isShowException() |
boolean |
isShowExchangeId() |
boolean |
isShowExchangePattern() |
boolean |
isShowFiles() |
boolean |
isShowFuture() |
boolean |
isShowHeaders() |
boolean |
isShowOut() |
boolean |
isShowProperties() |
boolean |
isShowStackTrace() |
boolean |
isShowStreams() |
boolean |
isSkipBodyLineSeparator() |
void |
setMaxChars(int maxChars) |
void |
setMultiline(boolean multiline)
If enabled then each information is outputted on a newline.
|
void |
setShowAll(boolean showAll) |
void |
setShowBody(boolean showBody) |
void |
setShowBodyType(boolean showBodyType) |
void |
setShowCaughtException(boolean showCaughtException) |
void |
setShowException(boolean showException) |
void |
setShowExchangeId(boolean showExchangeId) |
void |
setShowExchangePattern(boolean showExchangePattern) |
void |
setShowFiles(boolean showFiles)
If enabled Camel will output files
Is default disabled.
|
void |
setShowFuture(boolean showFuture)
If enabled Camel will on Future objects wait for it to complete to obtain the payload to be logged.
|
void |
setShowHeaders(boolean showHeaders) |
void |
setShowOut(boolean showOut) |
void |
setShowProperties(boolean showProperties) |
void |
setShowStackTrace(boolean showStackTrace) |
void |
setShowStreams(boolean showStreams)
If enabled Camel will output stream objects
Is default disabled.
|
void |
setSkipBodyLineSeparator(boolean skipBodyLineSeparator) |
void |
setStyle(DefaultExchangeFormatter.OutputStyle style)
Sets the outputs style to use.
|
public DefaultExchangeFormatter()
public String format(Exchange exchange)
ExchangeFormatter
format
in interface ExchangeFormatter
exchange
- the exchangepublic boolean isShowExchangeId()
public void setShowExchangeId(boolean showExchangeId)
public boolean isShowProperties()
public void setShowProperties(boolean showProperties)
public boolean isShowHeaders()
public void setShowHeaders(boolean showHeaders)
public boolean isSkipBodyLineSeparator()
public void setSkipBodyLineSeparator(boolean skipBodyLineSeparator)
public boolean isShowBodyType()
public void setShowBodyType(boolean showBodyType)
public boolean isShowBody()
public void setShowBody(boolean showBody)
public boolean isShowOut()
public void setShowOut(boolean showOut)
public boolean isShowAll()
public void setShowAll(boolean showAll)
public boolean isShowException()
public void setShowException(boolean showException)
public boolean isShowStackTrace()
public void setShowStackTrace(boolean showStackTrace)
public boolean isShowCaughtException()
public void setShowCaughtException(boolean showCaughtException)
public boolean isMultiline()
public int getMaxChars()
public void setMaxChars(int maxChars)
public void setMultiline(boolean multiline)
public boolean isShowFuture()
public void setShowFuture(boolean showFuture)
public boolean isShowExchangePattern()
public void setShowExchangePattern(boolean showExchangePattern)
public boolean isShowStreams()
public void setShowStreams(boolean showStreams)
public boolean isShowFiles()
public void setShowFiles(boolean showFiles)
public DefaultExchangeFormatter.OutputStyle getStyle()
public void setStyle(DefaultExchangeFormatter.OutputStyle style)
protected String getBodyAsString(Message message)
protected String getBodyTypeAsString(Message message)
Apache Camel