org.springframework.integration.handler
Class LoggingHandler
java.lang.Object
   org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.context.IntegrationObjectSupport
       org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.handler.AbstractMessageHandler
           org.springframework.integration.handler.LoggingHandler
org.springframework.integration.handler.LoggingHandler
- All Implemented Interfaces: 
- org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.core.Ordered, NamedComponent, Orderable, MessageHandler, TrackableComponent
- public class LoggingHandler 
- extends AbstractMessageHandler
MessageHandler implementation that simply logs the Message or its payload depending on the value of the
 'shouldLogFullMessage' property. If logging the payload, and it is assignable to Throwable, it will log the stack
 trace. By default, it will log the payload only.
- Since:
- 1.0.1
- Author:
- Mark Fisher
 
 
| Fields inherited from interface org.springframework.core.Ordered | 
| HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE | 
 
| Constructor Summary | 
| LoggingHandler(java.lang.String level)Create a LoggingHandler with the given log level (case-insensitive).
 | 
 
 
 
| Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport | 
| afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getTaskScheduler, onInit, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
 
 
LoggingHandler
public LoggingHandler(java.lang.String level)
- Create a LoggingHandler with the given log level (case-insensitive).
 
 The valid levels are: FATAL, ERROR, WARN, INFO, DEBUG, or TRACE
 
 
setExpression
public void setExpression(java.lang.String expressionString)
- 
 
setLoggerName
public void setLoggerName(java.lang.String loggerName)
- 
 
setShouldLogFullMessage
public void setShouldLogFullMessage(boolean shouldLogFullMessage)
- Specify whether to log the full Message. Otherwise, only the payload will be logged. This value is
 falseby default.
 
- 
 
getComponentType
public java.lang.String getComponentType()
- Description copied from class: IntegrationObjectSupport
- Subclasses may implement this method to provide component type information.
 
- 
- Specified by:
- getComponentTypein interface- NamedComponent
- Overrides:
- getComponentTypein class- AbstractMessageHandler
 
- 
 
handleMessageInternal
protected void handleMessageInternal(Message<?> message)
                              throws java.lang.Exception
- 
- Specified by:
- handleMessageInternalin class- AbstractMessageHandler
 
- 
- Throws:
- java.lang.Exception