org.springframework.integration.handler
Class LoggingHandler
java.lang.Object
  
org.springframework.integration.context.IntegrationObjectSupport
      
org.springframework.integration.handler.AbstractMessageHandler
          
org.springframework.integration.handler.LoggingHandler
- All Implemented Interfaces: 
 - BeanFactoryAware, BeanNameAware, InitializingBean, Ordered, NamedComponent, 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
 
 
 
 
| 
Constructor Summary | 
LoggingHandler(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, getRequiredMetadataPersister, getTaskScheduler, onInit, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString | 
 
 
 
LoggingHandler
public LoggingHandler(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(String expressionString)
 
setShouldLogFullMessage
public void setShouldLogFullMessage(boolean shouldLogFullMessage)
- Specify whether to log the full Message. Otherwise, only the payload
 will be logged. This value is 
false by default.
 
 
getComponentType
public String getComponentType()
- Description copied from class: 
IntegrationObjectSupport 
- Subclasses may implement this method to provide component type information.
- Specified by:
 getComponentType in interface NamedComponent- Overrides:
 getComponentType in class AbstractMessageHandler
 
 
 
handleMessageInternal
protected void handleMessageInternal(Message<?> message)
                              throws Exception
- Specified by:
 handleMessageInternal in class AbstractMessageHandler
 
- Throws:
 Exception
 
Copyright © 2010. All Rights Reserved.