Duplicate log message (ARCH1009)
Key dotnet.logging.duplicate-log-message · Severity info · Category logging · Principle Dry
Repeating the exact same log message in the same class makes it impossible to tell which path an event came from in the logs. Keep messages unique.
Incorrect
Section titled “Incorrect”public void Create() => _logger.LogInformation("Operation completed");public void Update() => _logger.LogInformation("Operation completed");Correct
Section titled “Correct”public void Create() => _logger.LogInformation("Create completed");public void Update() => _logger.LogInformation("Update completed");Make each log message specific to its operation, or add distinguishing context parameters so the messages are unique.