@Bean @ServiceActivator(inputChannel = "sendTimeChannel") public MessageHandler loggingChannelAdapter() { LoggingHandler loggingHandler = new LoggingHandler("info"); loggingHandler.setExpression( "'The time ' + payload + ' has been sent to the WebSocketSession ' + headers.simpSessionId"); return loggingHandler; }
@Bean public MessageHandler logger() { LoggingHandler loggingHandler = new LoggingHandler("INFO"); loggingHandler.setLoggerName("logger"); // This is redundant because the default expression is exactly "payload" // loggingHandler.setExpression("payload"); return loggingHandler; }