codegenomeproject
Search
MarketplaceModules
PackagesCLIMCP
Sign in
  1. Marketplace
  2. Java
  3. Logging
  4. Migrate JUL to Log4j 2.x API

Migrate JUL to Log4j 2.x API

MSAL

Transforms code written using java.util.logging to use Log4j 2.x API.

org.openrewrite.java.logging.log4j.JulToLog4j
mod run . --recipe=org.openrewrite.java.logging.log4j.JulToLog4j

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

Recipe
  1. Replace JUL Level arguments with the corresponding method calls
  2. Change method target to static
  3. Change method name java.util.logging.Logger config(..) to info
  4. Change method name java.util.logging.Logger fine(..) to debug
  5. Change method name java.util.logging.Logger finer(..) to trace
  6. Change method name java.util.logging.Logger finest(..) to trace
  7. Change method name java.util.logging.Logger severe(..) to error
  8. Change method name java.util.logging.Logger warning(..) to warn
  9. Rewrites JUL's Logger#entering method to Log4j API
  10. Rewrites JUL's Logger#exiting method to Log4j API
  11. Change type java.util.logging.Logger to org.apache.logging.log4j.Logger
  12. Replace any Lombok log annotations with target logging framework annotation
© Moderne, 2026
Recipe indexPrivacyTerms