Skip to content

feat(logging): tracing diagnostics with --log-format/--log-level (#51)#124

Merged
hyperpolymath merged 2 commits into
mainfrom
feat/vsm51-tracing
May 20, 2026
Merged

feat(logging): tracing diagnostics with --log-format/--log-level (#51)#124
hyperpolymath merged 2 commits into
mainfrom
feat/vsm51-tracing

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Add tracing + tracing-subscriber. Global --log-format=pretty|json and --log-level flags (precedence --log-level > RUST_LOG > info). The subscriber writes to stderr so the stdout data contract is never contaminated: JSON reports, the version string, the octad table, and the status/gc/validate report bodies stay on stdout verbatim. Only genuine diagnostics (schema parsing, file-write progress, "checking drift", "created manifest") become tracing events. JSON log schema documented in docs/logging.adoc + docs/logging.schema.json. New acceptance suite tests/logging_test.rs (6 tests): stdout purity, JSON-line schema validity, level filtering, RUST_LOG precedence.

Closes #51.

Summary

Changes

RSR Quality Checklist

Required

  • Tests pass (just test or equivalent)
  • Code is formatted (just fmt or equivalent)
  • Linter is clean (no new warnings or errors)
  • No banned language patterns (no TypeScript, no npm/bun, no Go/Python)
  • No unsafe blocks without // SAFETY: comments
  • No banned functions (believe_me, unsafeCoerce, Obj.magic, Admitted, sorry)
  • SPDX license headers present on all new/modified source files
  • No secrets, credentials, or .env files included

As Applicable

  • .machine_readable/STATE.a2ml updated (if project state changed)
  • .machine_readable/ECOSYSTEM.a2ml updated (if integrations changed)
  • .machine_readable/META.a2ml updated (if architectural decisions changed)
  • Documentation updated for user-facing changes
  • TOPOLOGY.md updated (if architecture changed)
  • CHANGELOG or release notes updated
  • New dependencies reviewed for license compatibility (PMPL-1.0-or-later / MPL-2.0)
  • ABI/FFI changes validated (src/interface/abi/ and src/interface/ffi/ consistent)

Testing

Screenshots

hyperpolymath and others added 2 commits May 17, 2026 05:48
Add tracing + tracing-subscriber. Global --log-format=pretty|json and
--log-level flags (precedence --log-level > RUST_LOG > info). The
subscriber writes to stderr so the stdout data contract is never
contaminated: JSON reports, the version string, the octad table, and
the status/gc/validate report bodies stay on stdout verbatim. Only
genuine diagnostics (schema parsing, file-write progress, "checking
drift", "created manifest") become tracing events. JSON log schema
documented in docs/logging.adoc + docs/logging.schema.json. New
acceptance suite tests/logging_test.rs (6 tests): stdout purity,
JSON-line schema validity, level filtering, RUST_LOG precedence.

Closes #51.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@hyperpolymath hyperpolymath merged commit b30ea01 into main May 20, 2026
1 of 16 checks passed
@hyperpolymath hyperpolymath deleted the feat/vsm51-tracing branch May 20, 2026 23:50
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.

V-L3-I1: replace println! with tracing; add --log-format=json|pretty + --log-level

1 participant