Migrate JUL to Log4j 2.x API
MSALTransforms code written using java.util.logging to use Log4j 2.x API.
org. openrewrite. java. logging. log4j. JulToLog4jmod run . --recipe= org. openrewrite. java. logging. log4j. JulToLog4jInstall 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.
- Replace JUL Level arguments with the corresponding method calls
- Change method target to static
- Change method name
java.util.logging.Logger config(..)toinfo - Change method name
java.util.logging.Logger fine(..)todebug - Change method name
java.util.logging.Logger finer(..)totrace - Change method name
java.util.logging.Logger finest(..)totrace - Change method name
java.util.logging.Logger severe(..)toerror - Change method name
java.util.logging.Logger warning(..)towarn - Rewrites JUL's Logger#entering method to Log4j API
- Rewrites JUL's Logger#exiting method to Log4j API
- Change type
java.util.logging.Loggertoorg.apache.logging.log4j.Logger - Replace any Lombok log annotations with target logging framework annotation