Skip to content

refactor: add consistent DiagnosticSource categories for all logging …#2

Open
negativeeddy wants to merge 1 commit into
masterfrom
refactor/diagnostic-categories
Open

refactor: add consistent DiagnosticSource categories for all logging …#2
negativeeddy wants to merge 1 commit into
masterfrom
refactor/diagnostic-categories

Conversation

@negativeeddy

Copy link
Copy Markdown
Owner

…services

  • Add a custom DiagnosticNameAttribute in ArmMedia.Core as a shared marker (System.Diagnostics.DiagnosticNameAttribute does not exist in .NET 10)
  • Add [DiagnosticName] attribute to every class that creates an ILogger
  • Convert all ILogger constructor injection to ILoggerFactory + CreateLogger
  • Add private const string DiagnosticCategory to each class, used in both the attribute and CreateLogger() to guarantee paired consistency
  • Update DiscPollingService to use UeventMonitor.DiagnosticCategory constant
  • Add System.Diagnostics.DiagnosticSource package reference (removed after realizing it's unnecessary in .NET 10)
  • Fix all test files to pass NullLoggerFactory.Instance instead of ILogger

…services

- Add a custom DiagnosticNameAttribute in ArmMedia.Core as a shared marker
  (System.Diagnostics.DiagnosticNameAttribute does not exist in .NET 10)
- Add [DiagnosticName] attribute to every class that creates an ILogger
- Convert all ILogger<T> constructor injection to ILoggerFactory + CreateLogger
- Add private const string DiagnosticCategory to each class, used in both
  the attribute and CreateLogger() to guarantee paired consistency
- Update DiscPollingService to use UeventMonitor.DiagnosticCategory constant
- Add System.Diagnostics.DiagnosticSource package reference (removed after
  realizing it's unnecessary in .NET 10)
- Fix all test files to pass NullLoggerFactory.Instance instead of ILogger<T>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant