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

Logger formatter to format the logging output.


Field Summary
protected static String LS
           
 
Constructor Summary
LogFormatter()
           
 
Method Summary
 String format(Exchange exchange)
          Generates a string representation of the exchange
protected  String getBodyAsString(Message message)
           
protected  String getBodyTypeAsString(Message message)
           
 int getMaxChars()
           
 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()
           
 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.

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LS

protected static final String LS
Constructor Detail

LogFormatter

public LogFormatter()
Method Detail

format

public String 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)

isShowStreams

public boolean isShowStreams()

setShowStreams

public void setShowStreams(boolean showStreams)
If enabled Camel will output stream objects

Is default disabled.


isShowFiles

public boolean isShowFiles()

setShowFiles

public void setShowFiles(boolean showFiles)
If enabled Camel will output files

Is default disabled.


getBodyAsString

protected String getBodyAsString(Message message)

getBodyTypeAsString

protected String getBodyTypeAsString(Message message)


Apache CAMEL