Find logger declaration smells

Proprietary

Bundles log vs logger naming, missing private on companion-object loggers, and instance-field loggers (one per allocation). The shape consensus is private val log = LoggerFactory.getLogger(...) in a companion object.

org.openrewrite.kotlin.logging.FindLoggerDeclarationSmells$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.logging.FindLoggerDeclarationSmells$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.

Recipe list

It runs these recipes, in this order.

  1. Find top-level/companion logger fields named log
  2. Find companion-object loggers missing private
  3. Find loggers declared as instance fields (one per object)