spring-projects / spring-framework

Spring Framework
https://spring.io/projects/spring-framework
Apache License 2.0
56.63k stars 38.14k forks source link

`LazyResolutionMessage` does not implement proper `toString` #21265

Closed spring-projects-issues closed 1 year ago

spring-projects-issues commented 6 years ago

John opened SPR-16724 and commented

When JMS listerner configured in spring reads JMS from queue/topic it can log the message just by enabling corresponding logger. For produced (outgoing) messages it works without problem. For consumed (incoming) messages logging is done by MessagingMessageListenerAdapter in method: onMessage but it is logged after transformation to MessagingMessage which is by default LazyResolutionMessage which means it breaks logging as no payload or headers are logged from this message class. Is there some easy way to log messages and avoud this lazy message?


Affects: 4.3.10, 5.0.5

snicoll commented 1 year ago

Thanks for the report. Yes, I can see how that's really annoying that the toString doesn't log the message properly. I've scheduled it for 6.x