Skip to content

CRARCH0023 Use typed logger category

  • Category: Architecture
  • Default severity: Warning
  • Diagnostic ID: CRARCH0023

Typed logger categories align log events with the producing type.

Inject ILogger<{0}> instead of '{1}'

Inject ILogger<TContainingType> instead of non-generic logger forms. If the injected logger is already generic but categorized under another type, change its category to the containing type as well.