Replace JUL log(Level, String, Throwable) with corresponding SLF4J method calls
MSALReplace calls to Logger.log(Level, String, Throwable) with the corresponding SLF4J method calls.
org. openrewrite. java. logging. slf4j. JulToSlf4jSimpleCallsWithThrowableRecipesmod run . --recipe= org. openrewrite. java. logging. slf4j. JulToSlf4jSimpleCallsWithThrowableRecipesInstall 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
logger.log(Level.FINEST, String message, Throwable e)with SLF4J'sLogger.trace(message, e) - Replace JUL
logger.log(Level.FINER, String message, Throwable e)with SLF4J'sLogger.trace(message, e) - Replace JUL
logger.log(Level.FINE, String message, Throwable e)with SLF4J'sLogger.debug(message, e) - Replace JUL
logger.log(Level.CONFIG, String message, Throwable e)with SLF4J'sLogger.info(message, e) - Replace JUL
logger.log(Level.INFO, String message, Throwable e)with SLF4J'sLogger.info(message, e) - Replace JUL
logger.log(Level.WARNING, String message, Throwable e)with SLF4J'sLogger.warn(message, e) - Replace JUL
logger.log(Level.SEVERE, String message, Throwable e)with SLF4J'sLogger.error(message, e) - Replace JUL
logger.log(Level.ALL, String message, Throwable e)with SLF4J'sLogger.trace(message, e)