The placeholders of a message template are defined by their name and their position. Log methods specify
the values for the placeholder at runtime by passing them in a params array:
logger.LogError("{First} placeholder and {Second} one.", first, second);
This rule raises an issue if the position of an argument does not match the position of the corresponding placeholder:
// 'first' and 'second' are swapped
logger.LogError("{First} placeholder and {Second} one.", second, first);
// ^^^^^^ ^^^^^
What is the potential impact?
Logging providers use placeholder names to create key/value pairs in the log entry. The key corresponds to the placeholder and the value is the
argument passed in the log call.
If the positions of the placeholder and the argument do not match, the value is associated with the wrong key. This corrupts the logs entry and
makes log analytics unreliable.