Find LoggerFactory.getLogger calls inside collection lambdas
ProprietaryLoggerFactory.getLogger(...) resolves the logger through SLF4J on every call. Inside a collection lambda that resolves the same logger per element — hoist it to a private val companion property.
org. openrewrite. kotlin. performance. FindLoggerFactoryGetLoggerInCollectionLambdas$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. performance. FindLoggerFactoryGetLoggerInCollectionLambdas$KtRecipe'Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.