You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Added a link to usage examples
Added a link to the LoggerExtensions.LogInformation Method to see usage examples
* Update docs/fundamentals/code-analysis/quality-rules/ca2254.md
Removed locale from the URL
Co-authored-by: David Pine <[email protected]>
* Update docs/fundamentals/code-analysis/quality-rules/ca2254.md
---------
Co-authored-by: David Pine <[email protected]>
Co-authored-by: Genevieve Warren <[email protected]>
Copy file name to clipboardExpand all lines: docs/fundamentals/code-analysis/quality-rules/ca2254.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,8 @@ Update the message template to be a constant expression. If you're using values
64
64
logger.Warning("Person {FirstName} {LastName} encountered an issue", firstName, lastName);
65
65
```
66
66
67
+
For usage examples, see the <xref:Microsoft.Extensions.Logging.LoggerExtensions.LogInformation%2A?displayProperty=nameWithType> method.
68
+
67
69
## When to suppress errors
68
70
69
71
It's safe to suppress a warning from this rule if your use case doesn't require structured logging. It's also safe to suppress this rule if your log message template is defined in a resource file.
0 commit comments