Skip to content

Recipe for migrating from JUL to slf4j? With support for Logger.log(Level,String) calls? #155

@timtebeek

Description

@timtebeek

Discussed in openrewrite/rewrite#4249

Originally posted by woj-tek June 13, 2024

For a long time we were using JUL (java.util.Logger, I know, bad!) and we kinda got stuck with it. However, it's getting more and more annoying to deal with it and it's high time to migrate to slf4j. I was looking for recipes to do so but found none.

I found, somewhat related, Migrate JUL to Log4j 2.x API (with the hope to use Migrate Log4j to SLF4J) but the first one didn't work because we rely heavily on Logger.log(Level,[message]) API instead of Logger.<level>(<message>) one which seems to be supported by looking at Definition and method signature.

Does anyone know any recipe for Logger.log(Level,String) calls?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions