Code Monkey home page Code Monkey logo

Comments (2)

artembilan avatar artembilan commented on June 11, 2024 1

I think I see what you mean. When I run our EnableRetryTests, I get these logs:

2024-01-11 13:54:01,882 DEBUG org.springframework.retry.support.RetryTemplate [main] : Retry: count=0
2024-01-11 13:54:01,886 DEBUG org.springframework.retry.support.RetryTemplate [main] : Checking for rethrow: count=1
2024-01-11 13:54:01,886 DEBUG org.springframework.retry.support.RetryTemplate [main] : Retry: count=1
2024-01-11 13:54:01,887 DEBUG org.springframework.retry.support.RetryTemplate [main] : Checking for rethrow: count=2
2024-01-11 13:54:01,887 DEBUG org.springframework.retry.support.RetryTemplate [main] : Retry: count=2
2024-01-11 13:54:01,887 DEBUG org.springframework.retry.support.RetryTemplate [main] : Checking for rethrow: count=3
2024-01-11 13:54:01,887 DEBUG org.springframework.retry.support.RetryTemplate [main] : Retry failed last attempt: count=3
2024-01-11 13:54:02,036 DEBUG org.springframework.retry.support.RetryTemplate [main] : Retry: count=0
2024-01-11 13:54:02,036 DEBUG org.springframework.retry.support.RetryTemplate [main] : Checking for rethrow: count=1
2024-01-11 13:54:02,036 DEBUG org.springframework.retry.support.RetryTemplate [main] : Retry: count=1
2024-01-11 13:54:02,036 DEBUG org.springframework.retry.support.RetryTemplate [main] : Checking for rethrow: count=2
2024-01-11 13:54:02,036 DEBUG org.springframework.retry.support.RetryTemplate [main] : Retry: count=2
2024-01-11 13:54:02,038 DEBUG org.springframework.retry.support.RetryTemplate [main] : Retry: count=0
2024-01-11 13:54:02,076 DEBUG org.springframework.retry.support.RetryTemplate [main] : Retry: count=0
2024-01-11 13:54:02,076 DEBUG org.springframework.retry.support.RetryTemplate [main] : Checking for rethrow: count=1
2024-01-11 13:54:02,076 DEBUG org.springframework.retry.support.RetryTemplate [main] : Retry: count=1
2024-01-11 13:54:02,076 DEBUG org.springframework.retry.support.RetryTemplate [main] : Checking for rethrow: count=2
2024-01-11 13:54:02,076 DEBUG org.springframework.retry.support.RetryTemplate [main] : Retry: count=2
2024-01-11 13:54:02,077 DEBUG org.springframework.retry.support.RetryTemplate [main] : Checking for rethrow: count=3
2024-01-11 13:54:02,077 DEBUG org.springframework.retry.support.RetryTemplate [main] : Retry failed last attempt: count=3

Really not very useful without a context we retry around.

I think I'll fix it adding a RetryContext.NAME to those logging messages.

from spring-retry.

artembilan avatar artembilan commented on June 11, 2024

Now this should look much better:

2024-01-11 14:33:50,226 DEBUG org.springframework.retry.support.RetryTemplate [main] : Retry: count=0; for: 'org.springframework.retry.annotation.EnableRetryTests$MultiService.service'
2024-01-11 14:33:50,226 DEBUG org.springframework.retry.support.RetryTemplate [main] : Checking for rethrow: count=1; for: 'org.springframework.retry.annotation.EnableRetryTests$MultiService.service'
2024-01-11 14:33:50,226 DEBUG org.springframework.retry.support.RetryTemplate [main] : Retry: count=1; for: 'org.springframework.retry.annotation.EnableRetryTests$MultiService.service'
2024-01-11 14:33:50,226 DEBUG org.springframework.retry.support.RetryTemplate [main] : Checking for rethrow: count=2; for: 'org.springframework.retry.annotation.EnableRetryTests$MultiService.service'
2024-01-11 14:33:50,226 DEBUG org.springframework.retry.support.RetryTemplate [main] : Retry: count=2; for: 'org.springframework.retry.annotation.EnableRetryTests$MultiService.service'
2024-01-11 14:33:50,229 DEBUG org.springframework.retry.support.RetryTemplate [main] : Retry: count=0; for: 'org.springframework.retry.annotation.EnableRetryTests$MultiService.other'
2024-01-11 14:33:50,261 DEBUG org.springframework.retry.support.RetryTemplate [main] : Retry: count=0; for: 'org.springframework.retry.annotation.EnableRetryTests$MultiService.conditional'
2024-01-11 14:33:50,261 DEBUG org.springframework.retry.support.RetryTemplate [main] : Checking for rethrow: count=1; for: 'org.springframework.retry.annotation.EnableRetryTests$MultiService.conditional'
2024-01-11 14:33:50,261 DEBUG org.springframework.retry.support.RetryTemplate [main] : Retry: count=1; for: 'org.springframework.retry.annotation.EnableRetryTests$MultiService.conditional'

I don't find this as a breaking change since all those logging messages are at the debug level.

So, testing and pushing...

from spring-retry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.