Skip to content

Add structured logging infrastructure using Microsoft.Extensions.Logging #56

Closed

Description

@General-Fault

Summary

Introduce logging infrastructure in WebRtcNet/WebRtcInterop based on Microsoft logging extensions so failures and diagnostic events can be surfaced consistently.

Motivation

We need first-class logging support before continuing media/interop hardening work. As an immediate example, audio device enumeration paths currently avoid surfacing diagnostics and should eventually emit useful logs.

Scope

  • Add project-level logging infrastructure aligned with modern .NET Core logging patterns.
  • Establish a consistent logging approach that can be used across managed and interop-facing code paths.

Out of scope

  • Detailed implementation design and wiring specifics.
  • Refactoring all existing code paths in this issue.

Acceptance criteria

  • A clear logging infrastructure baseline exists and is ready for incremental adoption in follow-up issues.

Activity

  1. General-Fault commented on Jun 5, 2026

    @General-Fault
    OwnerAuthor

    Status update from merged PR #57 (#57):

    What changed relevant to logging:

    • Media capture/device code was refactored and expanded (MediaDevices, camera-backed source, HRESULT helper).
    • Device enumeration and polling still include silent failure paths (catch (...) / retry behavior) with no structured logs yet.

    Plan update for #56:

    1. Introduce baseline Microsoft.Extensions.Logging wiring usable from managed and interop-facing entry points.
    2. Add initial logging at media device enumeration/polling and getUserMedia failure boundaries.
    3. Replace silent swallow paths with explicit diagnostic logging while preserving current retry/exception behavior.
    4. Follow with targeted adoption across remaining interop surfaces incrementally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions