New Java rule - log entry without context

Please consider implementing a rule to annotate log messages without the context (parameters), asking to add processing details. E.g. the message below has no context:

log.info("User added")

it should be changed to something like:

log.info("User added: userId={}");

Hi Artur,

Thank you for the suggestion!

Providing context in log messages is crucial, but it might be challenging to automatically detect every instance where context is available yet omitted. I don’t think we can enforce a rule requiring all log messages to contain context, as that could be too strict for many users.

Do you have any suggestions on how we could reliably detect such missing parameters?