org.apache.camel.component.log
Class LogFormatter

java.lang.Object
  extended by org.apache.camel.component.log.LogFormatter
All Implemented Interfaces:
ExchangeFormatter

public class LogFormatter
extends Object
implements ExchangeFormatter

Log formatter to format the logging output.


Constructor Summary
LogFormatter()
           
 
Method Summary
 Object format(Exchange exchange)
          Generates a string representation of the exchange
protected  Object getBodyAsString(Message message)
           
protected  Object getBodyTypeAsString(Message message)
           
 int getMaxChars()
           
 boolean isMultiline()
           
 boolean isShowAll()
           
 boolean isShowBody()
           
 boolean isShowBodyType()
           
 boolean isShowCaughtException()
           
 boolean isShowException()
           
 boolean isShowExchangeId()
           
 boolean isShowExchangePattern()
           
 boolean isShowFuture()
           
 boolean isShowHeaders()
           
 boolean isShowOut()
           
 boolean isShowProperties()
           
 boolean isShowStackTrace()
           
 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 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogFormatter

public LogFormatter()
Method Detail

format

public Object format(Exchange exchange)
Description copied from interface: ExchangeFormatter
Generates a string representation of the exchange

Specified by:
format in interface ExchangeFormatter
Parameters:
exchange - the exchange
Returns:
a string representation of the exchange

isShowExchangeId

public boolean isShowExchangeId()

setShowExchangeId

public void setShowExchangeId(boolean showExchangeId)

isShowProperties

public boolean isShowProperties()

setShowProperties

public void setShowProperties(boolean showProperties)

isShowHeaders

public boolean isShowHeaders()

setShowHeaders

public void setShowHeaders(boolean showHeaders)

isShowBodyType

public boolean isShowBodyType()

setShowBodyType

public void setShowBodyType(boolean showBodyType)

isShowBody

public boolean isShowBody()

setShowBody

public void setShowBody(boolean showBody)

isShowOut

public boolean isShowOut()

setShowOut

public void setShowOut(boolean showOut)

isShowAll

public boolean isShowAll()

setShowAll

public void setShowAll(boolean showAll)

isShowException

public boolean isShowException()

setShowException

public void setShowException(boolean showException)

isShowStackTrace

public boolean isShowStackTrace()

setShowStackTrace

public void setShowStackTrace(boolean showStackTrace)

isShowCaughtException

public boolean isShowCaughtException()

setShowCaughtException

public void setShowCaughtException(boolean showCaughtException)

isMultiline

public boolean isMultiline()

getMaxChars

public int getMaxChars()

setMaxChars

public void setMaxChars(int maxChars)

setMultiline

public void setMultiline(boolean multiline)
If enabled then each information is outputted on a newline.


isShowFuture

public boolean isShowFuture()

setShowFuture

public void setShowFuture(boolean showFuture)
If enabled Camel will on Future objects wait for it to complete to obtain the payload to be logged.

Is default disabled.


isShowExchangePattern

public boolean isShowExchangePattern()

setShowExchangePattern

public void setShowExchangePattern(boolean showExchangePattern)

getBodyAsString

protected Object getBodyAsString(Message message)

getBodyTypeAsString

protected Object getBodyTypeAsString(Message message)


Apache CAMEL