Skip to content

[C#] Add optional diagnostics logging (Microsoft.Extensions.Logging), off by default #109

Backlog

Description

@konard

Problem

mem-rs logs mapping, remapping, truncation and sparse decisions through the log facade, so field problems (for example "why did my file grow?") can be traced. C# has no diagnostics.

Proposed solution

  • Accept an optional ILogger (Microsoft.Extensions.Logging.Abstractions; NullLogger by default, so there is no runtime cost).
  • Use [LoggerMessage] source-generated log methods for map, unmap, resize, truncate, flush and sparse.
  • Alternatively, or in addition, an EventSource for dotnet-trace.
  • Disabled by default.

Part of #94 (catch up with mem-rs). Analysis and evidence: case study.

Activity

  1. added
    enhancement
    csharp
    mem-rs-parity
    on Nov 29, 2026
  2. added theissue type on Nov 29, 2026
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

    csharpenhancementmem-rs-parity

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions