public class LoggingHandler extends AbstractMessageHandler
| Modifier and Type | Class and Description |
|---|---|
static class |
LoggingHandler.Level |
IntegrationManagement.ManagementOverridesEXPRESSION_PARSER, loggerMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
LoggingHandler(LoggingHandler.Level level)
Create a
LoggingHandler with the given log LoggingHandler.Level. |
LoggingHandler(String level)
Create a LoggingHandler with the given log level (case-insensitive).
|
| Modifier and Type | Method and Description |
|---|---|
String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
LoggingHandler.Level |
getLevel() |
protected void |
handleMessageInternal(Message<?> message) |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
setLevel(LoggingHandler.Level level)
Set the logging
LoggingHandler.Level to change the behavior at runtime. |
void |
setLogExpression(Expression expression)
Set an
Expression to evaluate a log entry at runtime against the request Message. |
void |
setLogExpressionString(String expressionString)
Set a SpEL expression string to use.
|
void |
setLoggerName(String loggerName) |
void |
setShouldLogFullMessage(boolean shouldLogFullMessage)
Specify whether to log the full Message.
|
configureMetrics, destroy, getActiveCount, getActiveCountLong, getDuration, getErrorCount, getErrorCountLong, getHandleCount, getHandleCountLong, getManagedName, getManagedType, getMaxDuration, getMeanDuration, getMetricsCaptor, getMinDuration, getOrder, getOverrides, getStandardDeviationDuration, handleMessage, isCountsEnabled, isLoggingEnabled, isStatsEnabled, onComplete, onError, onNext, onSubscribe, registerMetricsCaptor, reset, setCountsEnabled, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, setStatsEnabledafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waiterrorCount, handleCountgetBeanName, getComponentNamepublic LoggingHandler(String level)
The valid levels are: FATAL, ERROR, WARN, INFO, DEBUG, or TRACE
level - The level.LoggingHandler(Level)public LoggingHandler(LoggingHandler.Level level)
LoggingHandler with the given log LoggingHandler.Level.level - the LoggingHandler.Level to use.public void setLogExpressionString(String expressionString)
expressionString - the SpEL expression string to use.setLogExpression(Expression)public void setLogExpression(Expression expression)
Expression to evaluate a log entry at runtime against the request Message.expression - the Expression to use.setLogExpressionString(String)public LoggingHandler.Level getLevel()
LoggingHandler.Level.public void setLevel(LoggingHandler.Level level)
LoggingHandler.Level to change the behavior at runtime.level - the level.public void setLoggerName(String loggerName)
public void setShouldLogFullMessage(boolean shouldLogFullMessage)
false by default.shouldLogFullMessage - true if the complete message should be logged.public String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class AbstractMessageHandlerprotected void onInit()
IntegrationObjectSupportonInit in class AbstractMessageHandlerprotected void handleMessageInternal(Message<?> message)
handleMessageInternal in class AbstractMessageHandler