Skip to content

Refactor: Use Standard OpenRewrite Recipes to implement Slf4j logging automatically #48

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

Draft
wants to merge 19 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
d8cc28f
refactor: inline usages of Utility.logWithDate
mcook42 Apr 6, 2025
8167547
tool: introduce rewrite.yml for automatic logging rewrites
mcook42 Apr 6, 2025
e63cc59
tool: add openrewrite plugin to maven pom.xml
mcook42 Apr 6, 2025
36c741c
refactor: run org.openrewrite.java.logging.CustomSystemPrintToLogging…
mcook42 Apr 6, 2025
23a674b
chore: set recipe refactor to use @Slf4j annotation
mcook42 Apr 6, 2025
9b0eb94
refactor: run org.openrewrite.java.migrate.lombok.log.UseSlf4j recipe…
mcook42 Apr 6, 2025
8e65bfe
chore: manually update logging in JsonToJavaConverter to use logger
mcook42 Apr 6, 2025
6061b7c
chore: remove unnecessary log and verify calls
mcook42 Apr 6, 2025
e40297e
chore: replace inaccurate log-based verify calls
mcook42 Apr 6, 2025
c75b067
chore: remove inaccurate log-based verify calls
mcook42 Apr 6, 2025
12bcb7a
chore: replace inaccurate log-based verify calls
mcook42 Apr 6, 2025
ef20065
test: remove log message assertions and disable low-value test
mcook42 Apr 6, 2025
981e61e
refactor: remove redundant log statements in test cases
mcook42 Apr 6, 2025
4857978
feat(logging): setup to run SLF4J best practices with updated recipes
mcook42 Apr 6, 2025
8b0931d
refactor(logging): use org.openrewrite.java.logging.slf4j.Slf4jBestPr…
mcook42 Apr 6, 2025
7d8bc8d
chore: remove Maven wrapper files
mcook42 Apr 6, 2025
c822a81
chore: remove openrewrite dependencies after migration completion
mcook42 Apr 6, 2025
ac81275
Merge branch 'dev' into mcook42/openrewrite/logging-framework
mcook42 Apr 7, 2025
aa4d890
remove duplicate annotations
mcook42 Apr 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(logging): setup to run SLF4J best practices with updated recipes
Added SLF4J best practices recipe to enforce proper logging conventions. Updated Maven dependencies and configuration to include the new rewrite-logging-frameworks artifact.
  • Loading branch information
mcook42 committed Apr 6, 2025
commit 4857978d40a5e1549da484bef100e39a005f117f
5 changes: 4 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,14 @@
<version>6.4.0</version>
<configuration>
<exportDatatables>true</exportDatatables>
<activeRecipes>
<recipe>org.openrewrite.java.logging.slf4j.Slf4jBestPractices</recipe>
</activeRecipes>
</configuration>
<dependencies>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-migrate-java</artifactId>
<artifactId>rewrite-logging-frameworks</artifactId>
<version>3.5.0</version>
</dependency>
</dependencies>
Expand Down
8 changes: 0 additions & 8 deletions rewrite.yml
Original file line number Diff line number Diff line change
@@ -1,8 +0,0 @@
---
type: specs.openrewrite.org/v1beta/recipe
name: org.mcook42.Slf4J
displayName: Use @Slf4 instead of explicit fields
recipeList:
- org.openrewrite.java.migrate.lombok.log.UseSlf4j:
fieldName: LOG