feat(logging): implement structured events across the foundation #5

Open
opened 2026-10-10 16:58:34 +00:00 by KofTwentyTwo · 1 comment
KofTwentyTwo commented 2026-10-10 16:58:34 +00:00 (Migrated from github.com)

Problem

IActivityLog accepts preformatted strings and callers interpolate values. Current K22-CODE-19 / K22-CODE-CS-10 require structured message templates and fields; no covering exception was found.

Acceptance criteria

Provide structured fields without losing existing logging behavior; migrate foundation and starter callers; verify retention, exceptions, thread safety and 100% core/update coverage; document API compatibility.

Scope

AppKit, samples and starter consumers.

This issue is part of the user-requested AppKit readiness remediation. Local work is not completion until the applicable published/runtime state and checks are verified. Substantial AI assistance: Codex.

## Problem IActivityLog accepts preformatted strings and callers interpolate values. Current K22-CODE-19 / K22-CODE-CS-10 require structured message templates and fields; no covering exception was found. ## Acceptance criteria Provide structured fields without losing existing logging behavior; migrate foundation and starter callers; verify retention, exceptions, thread safety and 100% core/update coverage; document API compatibility. ## Scope AppKit, samples and starter consumers. This issue is part of the user-requested AppKit readiness remediation. Local work is not completion until the applicable published/runtime state and checks are verified. Substantial AI assistance: Codex.
KofTwentyTwo commented 2026-10-10 18:09:10 +00:00 (Migrated from github.com)

Structured logging is implemented and committed locally in 7f70c31517bf405c8c830d8a7c89afe04f912435 (SSH-signed, DCO-signed off).

IActivityLog.AsLogger() exposes the standard .NET ILogger contract while retaining existing interface members and third-party sink compatibility. Structured records preserve original templates, rendered text, typed scalar/explicit JSON fields, event identity and async scopes. Full exception text, daily rollover/retention and thread-safe writes remain. Foundation update events, both framework crash nets and both samples use source-generated event methods. Documentation records the explicit value policy and the new official MIT-licensed runtime dependency, Microsoft.Extensions.Logging.Abstractions 10.0.12.

Verification: 146 unit tests and 12 UI tests passed; core/updates retain 100% line coverage. Locked restore, zero-warning build, full formatting verification and all commit hooks pass. Concurrent async scope/file integrity tests pass. Dependency scanning reported no known vulnerabilities and both Microsoft author and NuGet repository package signatures verified. Format reports the existing workspace-loading warning.

The unreleased version is now 0.2.0-dev for this added capability; published 0.1.0 remains unchanged. Remaining: publish the reviewed AppKit changes, then migrate the starter against the actual public package and regenerate its locks from public bytes. Do not commit locks from a local build as if they were public NuGet packages: that caused #3. No push, merge or new release occurred. AI assistance: Codex (GPT-6).

Structured logging is implemented and committed locally in `7f70c31517bf405c8c830d8a7c89afe04f912435` (SSH-signed, DCO-signed off). `IActivityLog.AsLogger()` exposes the standard .NET ILogger contract while retaining existing interface members and third-party sink compatibility. Structured records preserve original templates, rendered text, typed scalar/explicit JSON fields, event identity and async scopes. Full exception text, daily rollover/retention and thread-safe writes remain. Foundation update events, both framework crash nets and both samples use source-generated event methods. Documentation records the explicit value policy and the new official MIT-licensed runtime dependency, Microsoft.Extensions.Logging.Abstractions 10.0.12. Verification: 146 unit tests and 12 UI tests passed; core/updates retain 100% line coverage. Locked restore, zero-warning build, full formatting verification and all commit hooks pass. Concurrent async scope/file integrity tests pass. Dependency scanning reported no known vulnerabilities and both Microsoft author and NuGet repository package signatures verified. Format reports the existing workspace-loading warning. The unreleased version is now 0.2.0-dev for this added capability; published 0.1.0 remains unchanged. Remaining: publish the reviewed AppKit changes, then migrate the starter against the actual public package and regenerate its locks from public bytes. Do not commit locks from a local build as if they were public NuGet packages: that caused #3. No push, merge or new release occurred. AI assistance: Codex (GPT-6).
Sign in to join this conversation.