Skip to content

engine: standard-library logging for diagnostics#31

Merged
fruwe merged 1 commit into
mainfrom
engine-logging
Jul 1, 2026
Merged

engine: standard-library logging for diagnostics#31
fruwe merged 1 commit into
mainfrom
engine-logging

Conversation

@fruwe

@fruwe fruwe commented Jul 1, 2026

Copy link
Copy Markdown
Member

Closes #29.

Adds operational diagnostics via stdlib logging (distinct from the Observer, which is domain observability).

What

  • A package harel logger with a NullHandler attached in __init__silent by default; the host app opts in (logging.basicConfig(level=logging.DEBUG)).
  • Emit points: event dispatch + transition (DEBUG), spawn, publish, timer fire (DEBUG); dead-letter and fault transitions (WARNING). Per-module loggers (harel.engine, harel.instance).
  • Never logs to stdout (reserved for CLI results).

Verify

4 caplog tests (dispatch/transition at DEBUG, fault at WARNING, level gating, NullHandler present) + a smoke check that records emit once logging is enabled. Full gate: ruff + mypy clean; 173 tests (was 169). README documents it.

Add a 'harel' logger (NullHandler attached, silent by default). Emit debug at
event dispatch/transition, spawn, publish, and timer fire; warning at dead-letter
and when an instance faults. Diagnostics never touch stdout (reserved for CLI
results). Tests via caplog; README documents enabling it.

Closes #29.
@fruwe fruwe merged commit 16e4791 into main Jul 1, 2026
1 check passed
@fruwe fruwe deleted the engine-logging branch July 1, 2026 03:28
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.

engine: standard-library logging for diagnostics

1 participant