diff --git a/src/main/java/org/openrewrite/java/logging/ParameterizedLogging.java b/src/main/java/org/openrewrite/java/logging/ParameterizedLogging.java index 79c4107..b584307 100644 --- a/src/main/java/org/openrewrite/java/logging/ParameterizedLogging.java +++ b/src/main/java/org/openrewrite/java/logging/ParameterizedLogging.java @@ -30,7 +30,6 @@ import org.openrewrite.java.tree.JavaType; import org.openrewrite.java.tree.TypeUtils; -import java.time.Duration; import java.util.*; @Value @@ -56,12 +55,9 @@ public String getDisplayName() { @Override public String getDescription() { return "Transform logging statements using concatenation for messages and variables into a parameterized format. " + - "For example, `logger.info(\"hi \" + userName)` becomes `logger.info(\"hi {}\", userName)`."; - } - - @Override - public Duration getEstimatedEffortPerOccurrence() { - return Duration.ofMinutes(5); + "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."; } @Override diff --git a/src/main/resources/META-INF/rewrite/log4j.yml b/src/main/resources/META-INF/rewrite/log4j.yml index 8707cb6..d0b5169 100644 --- a/src/main/resources/META-INF/rewrite/log4j.yml +++ b/src/main/resources/META-INF/rewrite/log4j.yml @@ -17,7 +17,9 @@ type: specs.openrewrite.org/v1beta/recipe name: org.openrewrite.java.logging.log4j.ParameterizedLogging displayName: Parameterize Log4j 2.x logging statements -description: Log4j 2.x supports parameterized logging, which can significantly boost logging performance for disabled logging statements. +description: Use Log4j 2.x parameterized logging, which 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. tags: - logging - log4j diff --git a/src/main/resources/META-INF/rewrite/slf4j.yml b/src/main/resources/META-INF/rewrite/slf4j.yml index 407109e..8a36ecc 100644 --- a/src/main/resources/META-INF/rewrite/slf4j.yml +++ b/src/main/resources/META-INF/rewrite/slf4j.yml @@ -64,8 +64,9 @@ recipeList: --- type: specs.openrewrite.org/v1beta/recipe name: org.openrewrite.java.logging.slf4j.ParameterizedLogging -displayName: Parameterize SLF4J logging statements -description: SLF4J supports parameterized logging, which can significantly boost logging performance for disabled logging statements. +description: Use SLF4J's parameterized logging, which 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. tags: - logging - slf4j