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

Add JCL to Log4j API migration #129

Merged
merged 3 commits into from
Dec 11, 2023
Merged

Conversation

ppkarwasz
Copy link
Contributor

What's changed?

This PR adds a recipe to migrate from Apache Commons Logging to Log4j 2.x API: org.openrewrite.java.logging.log4j.CommonsLoggingToLog4j.

What's your motivation?

While it has an excellent SLF4J support rewrite-logging-frameworks is somehow lacking vis-à-vis Log4j 2.x API support.

As part of apache/logging-log4j2#2080 we plan to cover all conversions between the most popular logging APIs and Log4j API and between the most popular logging backends and Log4j Core. I would appreciate if these recipes could be included in an official OpenRewrite artifact.

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@timtebeek
Copy link
Contributor

Good to have you here @ppkarwasz ! Thanks for adding this migration to Log4j2 and glad to see you were able to reuse so many components. Always welcome to add more if that helps you there!

@timtebeek timtebeek merged commit 16dd092 into openrewrite:main Dec 11, 2023
1 check passed
@timtebeek timtebeek added the recipe Recipe Requested label Dec 11, 2023
@timtebeek
Copy link
Contributor

We usually release every two weeks or so, but can do point releases in between if that helps you there. In any case you can already try our snapshot versions. Thanks again!

@ppkarwasz ppkarwasz deleted the jcl-to-log4j branch December 11, 2023 13:49
@timtebeek
Copy link
Contributor

And it sounds like you might be interested in this community request:

@ppkarwasz
Copy link
Contributor Author

@timtebeek,

Thanks for the lightning-fast review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
recipe Recipe Requested
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants