MP0004
Optional policy restricting direct System.Console calls in projects that require structured logging.
| Property | Value |
|---|---|
| Category | Usage |
| Default severity | Disabled |
| Availability | Public analyzer package |
This rule is disabled by default. Set an explicit severity to opt in.
Configure severity
.editorconfig
dotnet_diagnostic.MP0004.severity = warning
Use none to disable the rule, or silent, suggestion, warning, or error to change its severity.
Suppress a specific occurrence
#pragma warning disable MP0004
// Code that intentionally violates MP0004.
#pragma warning restore MP0004