codegenomeproject
Search
MarketplaceModules
PackagesCLIMCP
Sign in
  1. Marketplace
  2. Java
  3. Logging
  4. Replace JUL log(Level, String, Throwable) with corresponding SLF4J method calls

Replace JUL log(Level, String, Throwable) with corresponding SLF4J method calls

MSAL

Replace calls to Logger.log(Level, String, Throwable) with the corresponding SLF4J method calls.

org.openrewrite.java.logging.slf4j.JulToSlf4jSimpleCallsWithThrowableRecipes
mod run . --recipe=org.openrewrite.java.logging.slf4j.JulToSlf4jSimpleCallsWithThrowableRecipes

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 logger.log(Level.FINEST, String message, Throwable e) with SLF4J's Logger.trace(message, e)
  2. Replace JUL logger.log(Level.FINER, String message, Throwable e) with SLF4J's Logger.trace(message, e)
  3. Replace JUL logger.log(Level.FINE, String message, Throwable e) with SLF4J's Logger.debug(message, e)
  4. Replace JUL logger.log(Level.CONFIG, String message, Throwable e) with SLF4J's Logger.info(message, e)
  5. Replace JUL logger.log(Level.INFO, String message, Throwable e) with SLF4J's Logger.info(message, e)
  6. Replace JUL logger.log(Level.WARNING, String message, Throwable e) with SLF4J's Logger.warn(message, e)
  7. Replace JUL logger.log(Level.SEVERE, String message, Throwable e) with SLF4J's Logger.error(message, e)
  8. Replace JUL logger.log(Level.ALL, String message, Throwable e) with SLF4J's Logger.trace(message, e)
© Moderne, 2026
Recipe indexPrivacyTerms