-
Notifications
You must be signed in to change notification settings - Fork 80
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
feat: use Lombok Log Annotations #644
Conversation
src/main/java/org/openrewrite/java/migrate/lombok/log/LogVisitor.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this work @timo-a ! I've made some changes to use Type and Method matchers when comparing current fields, pull up the majority of the logic into LogVisitor, and rename usages of any alternatively named logger fields. With that I think we're good to merge, thanks!
What's changed?
adds recipe that replaces explicit logger fields with the lombok annotation.
Anything in particular you'd like reviewers to focus on?
Naming of the declarative catch-all recipe.
The recipes have nullable arguments. Where should they be documented?
Anyone you would like to review specifically?
Any additional context
More context here: https://timo-a.github.io/rewrite-recipe-starter/component-singleton/0/recipes/lombok/log/a_LogManual.html
Some annotations (like
@Flogger
) are missing. This is on purpose. I've done what I consider the most commonly used ones. People who need others can easily add them, based on what's already there.The recipes allow for field names other than
log
, however they do not addlombok.log.fieldName=customLoggerName
to
lombok.config
. Not sure how difficult that would be to implement. Would be nice to have but I think the effort of doing it manually manual is reasonable.Checklist