How to troubleshoot recipe application (Maven-based execution) #4256
-
Is there any way to enable logging so that what's going on with recipe application can be understood? Are there any best practices in this area? Apologies if I missed it in the doc! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
hi! What aspect are you looking to troubleshoot? If you're finding it's taking a long time before it starts to run a recipe, then we might just be building up the model of your code, as explained here: https://docs.openrewrite.org/reference/faq#my-recipe-appears-to-hang-when-running.-whats-happening-is-there-a-progress-report If you're looking to attach a debugger, that's possible through the usual ways for Maven using Feel free to respond with more details as to what you're after, or mark this as the answer if it helps you out there. |
Beta Was this translation helpful? Give feedback.
-
Don't need to discuss it here, but I believe this is the issue we are facing. |
Beta Was this translation helpful? Give feedback.
That's helpful context, thanks! We've opted not to produce logging for such insights, but to produce data tables instead: https://docs.openrewrite.org/running-recipes/data-tables
Logging can get quite noisy, especially when you multiple ~2000 recipes for a Spring Boot migration times the number of files in a project. It's also not ideal for a structured analysis to gain the insights that you're after.
So instead we produce three data tables by default for every recipe run, if enabled, such that you can get insight into which recipes had results, or errors, and their runtime statistics. Look for these tables in your target folder to learn which recipes had results.