Skip to content

[FEATURE REQ] Generic core logging: add a check+error for log(String.format #39275

Open
@lmolkova

Description

@lmolkova

By removing logger.info(String, String... params) we lost the ability to do logger.info("foo {}", bar)

It should be ok:

  • logger.atInfo().addKeyValuePair("foo", "bar").log("important event about foo") is always better
  • if we want to remove/reduce dependency on slf4j relying on specific lazy-formatting is not a good option

To warn/educate SDK devs we can add a stylecheck that detects string formatting in log method call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CheckstyleLabel for tracking tasks related to checkstyle rulesClientThis issue points to a problem in the data-plane of the library.clientcore

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions