Should S4055 apply to debug log messages?

The following code causes S4055 - “Literals should not be passed as localized parameters”:

void MyMethod(Microsoft.Extensions.Logging.ILogger logger)
{
    logger.LogInformation("my debug log message"); // <<< S4055
}

Do you really think that debug logging should be localized (at all)?
Would it be possible to exclude methods from (popular) logging frameworks?

Hi @lg2de,

Excluding the rule from working on particular methods is not something that we support.

However, if you’re using connected mode, you can suppress these particular issues and then you won’t see them in your IDE. Otherwise, you can disable the rule entirely.

These are the only options at the moment.