Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default behavior should be to print some basic heartbeat in console #900

Open
nddipiazza-ebay opened this issue Nov 25, 2024 · 2 comments
Open
Labels
enhancement New feature or request question Further information is requested

Comments

@nddipiazza-ebay
Copy link

nddipiazza-ebay commented Nov 25, 2024

When I run a open rewrite maven plugin on a big project,

cd nickBigProject
mvn -U "org.openrewrite.maven:rewrite-maven-plugin:run" "-Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-migrate-java:LATEST,org.openrewrite.recipe:rewrite-testing-frameworks:2.23.0-SNAPSHOT,org.openrewrite.recipe:rewrite-spring:LATEST" "-Drewrite.activeRecipes=org.openrewrite.java.spring.boot2.SpringBoot2JUnit4to5Migration,org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic,org.openrewrite.java.migrate.UpgradeToJava17,org.openrewrite.java.testing.mockito.ReplacePowerMockito,org.openrewrite.maven.RemoveDuplicateDependencies"

Here is my default logging:

[INFO] Project [nickBigProject] Parsing source files
[INFO] Running recipe(s)...

Meanwhile left wondering hmmmmm I wonder how it's going?

The Default logging some have some basic heartbeat.

@nddipiazza-ebay nddipiazza-ebay added the enhancement New feature or request label Nov 25, 2024
@nddipiazza-ebay nddipiazza-ebay changed the title Default behavior should be print some basic bare bones info about recipes Default behavior should be print some basic heartbeat mvn console Nov 25, 2024
@nddipiazza-ebay nddipiazza-ebay changed the title Default behavior should be print some basic heartbeat mvn console Default behavior should be print some basic heartbeat in console Nov 25, 2024
@nddipiazza-ebay nddipiazza-ebay changed the title Default behavior should be print some basic heartbeat in console Default behavior should be to print some basic heartbeat in console Nov 25, 2024
@timtebeek
Copy link
Contributor

hi @nddipiazza-ebay ; Appreciate your concern when running on a large project; We've had some internal discussions around this subject in the past as well, most recently in

In short we're hesitant to add logging to the plugins, as it's hard to provide a uniform experience there. For large projects the OSS Maven and Gradle projects aren't a perfect fit either, as you'd have to be able to keep the full model in memory and it gets discarded after every recipe run. This in contrast to the Moderne CLI which serializes the model, and can handle large projects easily. Perhaps you'd care to evaluate that for your use cases there? Happy to discuss that on a call if needed.

@timtebeek timtebeek added the question Further information is requested label Nov 25, 2024
@timtebeek
Copy link
Contributor

Also: perhaps you'd be interested to pass in -Drewrite.metricsUri=LOG or even a proper URI to get some metrics out of your recipe runs; that might help you to monitor what the run is doing.

Any time spent downloading should be visible from the debug logging already as well

public void downloadSuccess(ResolvedGroupArtifactVersion gav, @Nullable ResolvedPom containing) {
if (logger.isDebugEnabled()) {
logger.debug("Downloaded " + gav + pomContaining(containing));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
Status: No status
Development

No branches or pull requests

2 participants