spring-projects / spring-integration-samples

You are looking for examples, code snippets, sample applications for Spring Integration? This is the place.

Home Page:http://www.springsource.org/spring-integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Server-side logging seems to be broken

swiss-chris opened this issue · comments

When running this Application, I expected to see a log message being printed in the console every second, according to the format defined inside loggingChannelAdapter(). Something like:

The time 23 December 2022, 15:25:34 has been sent to the WebSocketSession WebSocketClient-AsyncIO-10

Am I missing something or is it broken ?

This would be very helpful, because the first time I ran the server application, I though something was broken, because all the console logs ist the Spring Boot banner and then the line:

Hit 'Enter' to terminate

"'The time ' + payload + ' has been sent to the WebSocketSession ' + headers.simpSessionId");

PS: I tried a few things to get it to work, but was unsuccessful. I'm used to logging with the DSL, but I'm not familiar with logging in the basic (non-DSL) SI. Any help to get this to work would be appreciated.

Fixed in the latest main.

The log() in Java DSL is fully based on the LoggingHandler, so I'm not sure what problem have you faced to trying few things: https://docs.spring.io/spring-integration/docs/current/reference/html/messaging-endpoints.html#logging-channel-adapter