Replace JUL active Level check with corresponding SLF4J method calls
MSALReplace calls to Logger.isLoggable(Level) with the corresponding SLF4J method calls.
org. openrewrite. java. logging. slf4j. JulIsLoggableToIsEnabledRecipesmod run . --recipe= org. openrewrite. java. logging. slf4j. JulIsLoggableToIsEnabledRecipesInstall 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.isLoggable(Level.ALL)with SLF4J'sLogger.isTraceEnabled - Replace JUL
Logger.isLoggable(Level.FINEST)with SLF4J'sLogger.isTraceEnabled - Replace JUL
Logger.isLoggable(Level.FINER)with SLF4J'sLogger.isTraceEnabled() - Replace JUL
Logger.isLoggable(Level.FINE)with SLF4J'sLogger.isDebugEnabled() - Replace JUL
Logger.isLoggable(Level.CONFIG)with SLF4J'sLogger.isInfoEnabled() - Replace JUL
Logger.isLoggable(Level.INFO)with SLF4J'sLogger.isInfoEnabled() - Replace JUL
Logger.isLoggable(Level.WARNING)with SLF4J'sLogger.isWarnEnabled() - Replace JUL
Logger.isLoggable(Level.SEVERE)with SLF4J'sLogger.isErrorEnabled()