feat: eventlog writes to dedicated events journal; init/backfill/close wiring

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 15:03:48 -04:00
co-authored by Claude Fable 5
parent 16c2922bea
commit a3f303e6ba
4 changed files with 82 additions and 3 deletions
+15
View File
@@ -406,6 +406,21 @@ Potential improvements for future versions:
- Journal file encryption
- Signed journal entries
## Events journal
Alert/connectivity events shown on the `/log` page are written to a second,
dedicated journal (one JSON object per line, same rotation mechanism):
| Key | Default | Meaning |
|---|---|---|
| `events_journal_file` | `events.journal` | Filename inside `journal_dir` |
| `events_journal_max_size` | 10 MB | Rotation threshold |
| `events_journal_max_backups` | 10 | Rotated files kept |
`journal_dir` and `journal_enabled` are shared with the message journal.
On startup, if the events journal file is empty, it is seeded once from the
pickled in-memory message ring so history survives the upgrade.
## See Also
- [Configuration Guide](../hbd/config.py) - Full configuration options