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

feat: use Lombok Log Annotations #644

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

timo-a
Copy link
Contributor

@timo-a timo-a commented Dec 24, 2024

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 add lombok.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

  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant