Initial commit
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
Fully Qualified Recipe Name,Recipe Name,Description
|
||||
org.openrewrite.java.logging.containerized.ContainerizeLog4j2PropertiesConfiguration,Containerize Log4j2 Properties configuration,Transforms Log4j2 Properties configuration to write logs to stdout instead of files suitable for containerized environments.
|
||||
org.openrewrite.java.logging.containerized.ContainerizeLog4j2XmlConfiguration,Containerize Log4j2 XML configuration,Transforms Log4j2 XML configuration to write logs to stdout instead of files suitable for containerized environments.
|
||||
org.openrewrite.java.logging.containerized.ContainerizeLog4j2YamlConfiguration,Containerize Log4j2 YAML configuration,Transforms Log4j2 YAML configuration to write logs to stdout instead of files suitable for containerized environments. (Implementation in progress)
|
||||
org.openrewrite.java.logging.containerized.ContainerizeLogbackConfiguration,Containerize Logback configuration,Transforms Logback XML configuration to write logs to stdout instead of files suitable for containerized environments.
|
||||
org.openrewrite.java.logging.containerized.ContainerizeLogging,Containerize logging configuration,Transforms logging configurations to write to stdout instead of files making them suitable for containerized environments. This composite recipe applies transformations for multiple logging frameworks including Log4j2 Logback Log4j 1.x and Java Util Logging.
|
||||
org.openrewrite.java.logging.containerized.log4j2.ContainerizeLog4j2,Containerize Log4j2 configuration,Transforms all Log4j2 configuration formats (XML Properties YAML JSON) to write logs to stdout instead of files.
|
||||
org.openrewrite.codehaus.plexus.AbstractLogEnabledToSlf4j,Migrate from Plexus `AbstractLogEnabled` to SLF4J,Introduce a SLF4J `Logger` field and replace calls to `getLogger()` with calls to the field.
|
||||
org.openrewrite.java.logging.ArgumentArrayToVarargs,Unpack Logger method `new Object[] {...}` into varargs,For Logger methods that support varargs convert any final explicit `Object[]` arguments into their unpacked values.
|
||||
org.openrewrite.java.logging.ChangeLoggersToPrivate,Change logger fields to `private`,Ensures that logger fields are declared as `private` to encapsulate logging mechanics within the class.
|
||||
org.openrewrite.java.logging.ParameterizedLogging,Parameterize logging statements,"Transform logging statements using concatenation for messages and variables into a parameterized format. For example `logger.info(""hi "" + userName)` becomes `logger.info(""hi {}"" userName)`. This can significantly boost performance for messages that otherwise would be assembled with String concatenation. Particularly impactful when the log level is not enabled as no work is done to assemble the message."
|
||||
org.openrewrite.java.logging.PrintStackTraceToLogError,Use logger instead of `printStackTrace()`,When a logger is present log exceptions rather than calling `printStackTrace()`.
|
||||
org.openrewrite.java.logging.SystemErrToLogging,Use logger instead of `System.err` print statements,Replace `System.err` print statements with a logger.
|
||||
org.openrewrite.java.logging.SystemOutToLogging,Use logger instead of `System.out` print statements,Replace `System.out` print statements with a logger.
|
||||
org.openrewrite.java.logging.SystemPrintToLogging,Use logger instead of system print statements,Replace `System.out` and `System.err` print statements with a logger.
|
||||
org.openrewrite.java.logging.jboss.FormattedArgumentsToVMethodRecipes,Replace deprecated JBoss Logging Logger formatted message invocations with the v-version of methods,"Replace `logger.level(""hello {0}"" arg)` with `logger.levelv(""hello {0}"" arg)`."
|
||||
org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelConfigSupplierToMethodRecipe,Replace JUL `Logger.log(Level.CONFIG Supplier<String>)` with `Logger.config(Supplier<String>)`,Replace calls to `java.util.logging.Logger.log(Level.CONFIG Supplier<String>)` with `Logger.config(Supplier<String>)`.
|
||||
org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelConfigToMethodRecipe,Replace JUL `Logger.log(Level.CONFIG String)` with `Logger.config(String)`,Replace calls to `java.util.logging.Logger.log(Level.CONFIG String)` with `Logger.config(String)`.
|
||||
org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelFineSupplierToMethodRecipe,Replace JUL `Logger.log(Level.FINE Supplier<String>)` with `Logger.fine(Supplier<String>)`,Replace calls to `java.util.logging.Logger.log(Level.FINE Supplier<String>)` with `Logger.fine(Supplier<String>)`.
|
||||
org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelFineToMethodRecipe,Replace JUL `Logger.log(Level.FINE String)` with `Logger.fine(String)`,Replace calls to `java.util.logging.Logger.log(Level.FINE String)` with `Logger.fine(String)`.
|
||||
org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelFinerSupplierToMethodRecipe,Replace JUL `Logger.log(Level.FINER Supplier<String>)` with `Logger.finer(Supplier<String>)`,Replace calls to `java.util.logging.Logger.log(Level.FINER Supplier<String>)` with `Logger.finer(Supplier<String>)`.
|
||||
org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelFinerToMethodRecipe,Replace JUL `Logger.log(Level.FINER String)` with `Logger.finer(String)`,Replace calls to `java.util.logging.Logger.log(Level.FINER String)` with `Logger.finer(String)`.
|
||||
org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelFinestSupplierToMethodRecipe,Replace JUL `Logger.log(Level.FINEST Supplier<String>)` with `Logger.finest(Supplier<String>)`,Replace calls to `java.util.logging.Logger.log(Level.FINEST Supplier<String>)` with `Logger.finest(Supplier<String>)`.
|
||||
org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelFinestToMethodRecipe,Replace JUL `Logger.log(Level.FINEST String)` with `Logger.finest(String)`,Replace calls to `java.util.logging.Logger.log(Level.FINEST String)` with `Logger.finest(String)`.
|
||||
org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelInfoSupplierToMethodRecipe,Replace JUL `Logger.log(Level.INFO Supplier<String>)` with `Logger.info(Supplier<String>)`,Replace calls to `java.util.logging.Logger.log(Level.INFO Supplier<String>)` with `Logger.info(Supplier<String>)`.
|
||||
org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelInfoToMethodRecipe,Replace JUL `Logger.log(Level.INFO String)` with `Logger.info(String)`,Replace calls to `java.util.logging.Logger.log(Level.INFO String)` with `Logger.info(String)`.
|
||||
org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelSevereSupplierToMethodRecipe,Replace JUL `Logger.log(Level.SEVERE Supplier<String>)` with `Logger.severe(Supplier<String>)`,Replace calls to `java.util.logging.Logger.log(Level.SEVERE Supplier<String>)` with `Logger.severe(Supplier<String>)`.
|
||||
org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelSevereToMethodRecipe,Replace JUL `Logger.log(Level.SEVERE String)` with `Logger.severe(String)`,Replace calls to `java.util.logging.Logger.log(Level.SEVERE String)` with `Logger.severe(String)`.
|
||||
org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelWarningSupplierToMethodRecipe,Replace JUL `Logger.log(Level.WARNING Supplier<String>)` with `Logger.warning(Supplier<String>)`,Replace calls to `java.util.logging.Logger.log(Level.WARNING Supplier<String>)` with `Logger.warning(Supplier<String>)`.
|
||||
org.openrewrite.java.logging.jul.LoggerLevelArgumentToMethodRecipes$LogLevelWarningToMethodRecipe,Replace JUL `Logger.log(Level.WARNING String)` with `Logger.warning(String)`,Replace calls to `java.util.logging.Logger.log(Level.WARNING String)` with `Logger.warning(String)`.
|
||||
org.openrewrite.java.logging.log4j.ConvertJulEntering,Rewrites JUL's Logger#entering method to Log4j API,Replaces JUL's Logger#entering method calls to Log4j API Logger#traceEntry calls.
|
||||
org.openrewrite.java.logging.log4j.ConvertJulExiting,Rewrites JUL's Logger#exiting method to Log4j API,Replaces JUL's Logger#exiting method calls to Log4j API Logger#traceEntry calls.
|
||||
org.openrewrite.java.logging.log4j.LoggerSetLevelToConfiguratorRecipe,Convert Log4j `Logger.setLevel` to Log4j2 `Configurator.setLevel`,Converts `org.apache.log4j.Logger.setLevel` to `org.apache.logging.log4j.core.config.Configurator.setLevel`.
|
||||
org.openrewrite.java.logging.logback.ConfigureLoggerLevel,Configure logback logger level,Within logback.xml configuration files sets the specified log level for a particular class. Will not create a logback.xml if one does not already exist.
|
||||
org.openrewrite.java.logging.logback.Log4jAppenderToLogback,Migrate Log4j 2.x Appender to logback-classic equivalents,Migrates custom Log4j 2.x Appender components to `logback-classic`. This recipe operates on the following assumptions: 1.) The contents of the `append()` method remains unchanged. 2.) The `requiresLayout()` method is not used in logback and can be removed. 3.) In logback the `stop()` method is the equivalent of log4j's close() method. For more details see this page from logback: [`Migration from log4j`](http://logback.qos.ch/manual/migrationFromLog4j.html).
|
||||
org.openrewrite.java.logging.logback.Log4jLayoutToLogback,Migrate Log4j 2.x Layout to logback-classic equivalents,Migrates custom Log4j 2.x Layout components to `logback-classic`. This recipe operates on the following assumptions: 1. A logback-classic layout must extend the `LayoutBase<ILoggingEvent>` class. 2. log4j's `format()` is renamed to `doLayout()` in a logback-classic layout. 3. LoggingEvent `getRenderedMessage()` is converted to LoggingEvent `getMessage()`. 4. The log4j ignoresThrowable() method is not needed and has no equivalent in logback-classic. 5. The activateOptions() method merits further discussion. In log4j a layout will have its activateOptions() method invoked by log4j configurators that is PropertyConfigurator or DOMConfigurator just after all the options of the layout have been set. Thus the layout will have an opportunity to check that its options are coherent and if so proceed to fully initialize itself. 6. In logback-classic layouts must implement the LifeCycle interface which includes a method called start(). The start() method is the equivalent of log4j's activateOptions() method. For more details see this page from logback: [`Migration from log4j`](http://logback.qos.ch/manual/migrationFromLog4j.html).
|
||||
org.openrewrite.java.logging.slf4j.ChangeLogLevel,Change SLF4J log level,Change the log level of SLF4J log statements.
|
||||
org.openrewrite.java.logging.slf4j.JulGetLoggerToLoggerFactoryRecipes,Replace JUL Logger creation with SLF4J LoggerFactory,Replace calls to `Logger.getLogger` with `LoggerFactory.getLogger`.
|
||||
org.openrewrite.java.logging.slf4j.JulGetLoggerToLoggerFactoryRecipes$GetLoggerClassCanonicalNameToLoggerFactoryRecipe,Replace JUL `Logger.getLogger(Some.class.getCanonicalName())` with SLF4J's `LoggerFactory.getLogger(Some.class)`,Replace calls to `java.util.logging.Logger.getLogger(Some.class.getCanonicalName())` with `org.slf4j.LoggerFactory.getLogger(Some.class)`.
|
||||
org.openrewrite.java.logging.slf4j.JulGetLoggerToLoggerFactoryRecipes$GetLoggerClassNameToLoggerFactoryRecipe,Replace JUL `Logger.getLogger(Some.class.getName())` with SLF4J's `LoggerFactory.getLogger(Some.class)`,Replace calls to `java.util.logging.Logger.getLogger(Some.class.getName())` with `org.slf4j.LoggerFactory.getLogger(Some.class)`.
|
||||
org.openrewrite.java.logging.slf4j.JulIsLoggableToIsEnabledRecipes,Replace JUL active Level check with corresponding SLF4J method calls,Replace calls to `Logger.isLoggable(Level)` with the corresponding SLF4J method calls.
|
||||
org.openrewrite.java.logging.slf4j.JulIsLoggableToIsEnabledRecipes$LoggerIsLoggableLevelAllRecipe,Replace JUL `Logger.isLoggable(Level.ALL)` with SLF4J's `Logger.isTraceEnabled`,Replace calls to `java.util.logging.Logger.isLoggable(Level.ALL)` with `org.slf4j.Logger.isTraceEnabled()`.
|
||||
org.openrewrite.java.logging.slf4j.JulIsLoggableToIsEnabledRecipes$LoggerIsLoggableLevelConfigRecipe,Replace JUL `Logger.isLoggable(Level.CONFIG)` with SLF4J's `Logger.isInfoEnabled()`,Replace calls to `java.util.logging.Logger.isLoggable(Level.CONFIG)` with `org.slf4j.Logger.isInfoEnabled()`.
|
||||
org.openrewrite.java.logging.slf4j.JulIsLoggableToIsEnabledRecipes$LoggerIsLoggableLevelFineRecipe,Replace JUL `Logger.isLoggable(Level.FINE)` with SLF4J's `Logger.isDebugEnabled()`,Replace calls to `java.util.logging.Logger.isLoggable(Level.FINE)` with `org.slf4j.Logger.isDebugEnabled()`.
|
||||
org.openrewrite.java.logging.slf4j.JulIsLoggableToIsEnabledRecipes$LoggerIsLoggableLevelFinerRecipe,Replace JUL `Logger.isLoggable(Level.FINER)` with SLF4J's `Logger.isTraceEnabled()`,Replace calls to `java.util.logging.Logger.isLoggable(Level.FINER)` with `org.slf4j.Logger.isTraceEnabled()`.
|
||||
org.openrewrite.java.logging.slf4j.JulIsLoggableToIsEnabledRecipes$LoggerIsLoggableLevelFinestRecipe,Replace JUL `Logger.isLoggable(Level.FINEST)` with SLF4J's `Logger.isTraceEnabled`,Replace calls to `java.util.logging.Logger.isLoggable(Level.FINEST)` with `org.slf4j.Logger.isTraceEnabled()`.
|
||||
org.openrewrite.java.logging.slf4j.JulIsLoggableToIsEnabledRecipes$LoggerIsLoggableLevelInfoRecipe,Replace JUL `Logger.isLoggable(Level.INFO)` with SLF4J's `Logger.isInfoEnabled()`,Replace calls to `java.util.logging.Logger.isLoggable(Level.INFO)` with `org.slf4j.Logger.isInfoEnabled()`.
|
||||
org.openrewrite.java.logging.slf4j.JulIsLoggableToIsEnabledRecipes$LoggerIsLoggableLevelSevereRecipe,Replace JUL `Logger.isLoggable(Level.SEVERE)` with SLF4J's `Logger.isErrorEnabled()`,Replace calls to `java.util.logging.Logger.isLoggable(Level.SEVERE)` with `org.slf4j.Logger.isErrorEnabled()`.
|
||||
org.openrewrite.java.logging.slf4j.JulIsLoggableToIsEnabledRecipes$LoggerIsLoggableLevelWarningRecipe,Replace JUL `Logger.isLoggable(Level.WARNING)` with SLF4J's `Logger.isWarnEnabled()`,Replace calls to `java.util.logging.Logger.isLoggable(Level.WARNING)` with `org.slf4j.Logger.isWarnEnabled()`.
|
||||
org.openrewrite.java.logging.slf4j.JulLevelAllToTraceRecipe,Replace JUL `Level.ALL` logging with SLF4J's trace level,Replace `java.util.logging.Logger#log(Level.ALL String)` with `org.slf4j.Logger#trace(String)`.
|
||||
org.openrewrite.java.logging.slf4j.JulParameterizedArguments,Replace parameterized JUL level call with corresponding SLF4J method calls,Replace calls to parameterized `Logger.log(LevelString…)` call with the corresponding slf4j method calls transforming the formatter and parameter lists.
|
||||
|
Reference in New Issue
Block a user