Migrate Log4j 2.x to Logback
MSALMigrates usage of Apache Log4j 2.x to using logback as an SLF4J implementation directly. Note, this currently does not modify log4j.properties files.
org. openrewrite. java. logging. logback. Log4jToLogbackmod run . --recipe= org. openrewrite. java. logging. logback. Log4jToLogbackInstall 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.
- Migrate Log4j to SLF4J
- Migrate Log4j 2.x Appender to logback-classic equivalents
- Migrate Log4j 2.x Layout to logback-classic equivalents
- Add Gradle or Maven dependency
ch.qos.logback:logback-core:latest.release - Add Gradle or Maven dependency
ch.qos.logback:logback-classic:latest.release - Add Gradle or Maven dependency
org.slf4j:slf4j-api:latest.release - Remove a Gradle or Maven dependency
org.apache.logging.log4j:log4j-*