Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-3750

MessagingGatewaySupport - log exception stack trace

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Works as Designed
    • Affects Version/s: 4.1.5
    • Fix Version/s: None
    • Component/s: Core

      Description

      After migrating to Spring Integration 4 I've noticed that my logs become very clear, no exceptions. Looking deeper at the problem, found this commit:

      https://github.com/spring-projects/spring-integration/commit/5f214ea5596e8b34861157d1f051d30e19531b46#diff-76cdf28789db118253cbca3e59bdca70

      1. Instead of logging throwable - now we log e.getMessage() and so, stack-trace is not available anymore. I could not find another lightweight and reliable way to log all exceptions, so propose to add second parameter (Throwable) again to the log statement:

      logger.debug("failure occurred in gateway sendAndReceive", e); 
      

      2. This is probably not so important as first one, but anyway: by default we do not log exceptions anymore (only in debug level) and it might be not obvious for developers how find this place and enable logging of errors. I would propose to set logging level here to warn and everyone can suppress error messages in logging configuration.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              abilan Artem Bilan
              Reporter:
              ymykhaylov Yehor Mykhaylov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: