-
Notifications
You must be signed in to change notification settings - Fork 1
how to monitor logging
Bryan edited this page Jun 13, 2026
·
1 revision
The daemon logs local request events as structured JSON. Logging helpers live in src/lode/observability.py, and daemon calls happen in record_request() in src/lode/daemon.py.
log_event() in src/lode/observability.py writes JSON with an event, a numeric time, and caller-provided fields. Daemon requests use event name http_request and include request ID, method, path, and status.
sanitize() in src/lode/observability.py recursively redacts dictionary keys containing sensitive terms. Tests in tests/test_observability.py verify that redaction works for nested values.
Use log_event() instead of plain print() for daemon or background operations. Include concrete, non-secret fields such as repo_id, path, status, and request_id when useful.
| File | Purpose |
|---|---|
src/lode/observability.py |
Structured log and redaction helpers. |
src/lode/daemon.py |
Request logging integration. |
tests/test_observability.py |
Log and redaction tests. |