Use Logger#getGlobal()

MSAL

The preferred way to get the global logger object is via the call Logger#getGlobal() over direct field access to java.util.logging.Logger.global.

org.openrewrite.java.migrate.logging.MigrateLoggerGlobalToGetGlobal
mod run . --recipe=org.openrewrite.java.migrate.logging.MigrateLoggerGlobalToGetGlobal

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. Change static field access to static method access Logger#global to getGlobal