Logs: fields, filters, live and export #244

Merged
jcoffey-dev merged 1 commits from feat/229-logs into main 2026-11-18 20:06:37 +00:00
Owner

Fixes #229 (forum t/308). Pairs with inbuxa/inbuxa-server#455.

The Logs page was the generic list. It's now its own page (src/features/logs/):

  • Structured entries: each entry opens to show its fields, split from the tracer's key = value, … text (strings unquoted; nested events and lists kept whole; details that aren't pairs are shown as they are). The open entry has "Only " and, where the local AI is on, Explain this.
  • Levels in colour, from the schema's TracingLevel colours, with the level written out.
  • Filters: level and above, component (smtp matches smtp.*, not smtps.*), text, from/to time.
  • Follow live / Pause: asks for the newest page every 5 s while the tab is visible; keeps up to 1,000 entries; if the newest shown entry is gone from the fresh page (a burst, or the files rotated and the ids moved), the fresh page replaces it. No new server endpoint.
  • Save as file: up to 5,000 filtered entries as .jsonl (fields split out) or .log.

A server with no Log tracer still gets the note from #217. Level/component/time need server #455; everything else works with older servers.

Not here: entries come from the node that answered, as before (a cluster has one log per node). A JSON line format for the Log tracer itself is a separate server issue.

Checks run locally: typecheck, lint, i18n:check (31 new strings), 1132 tests (11 new), the three shell tests, build, notice-check. Not checked in a browser against a running server.

Fixes #229 (forum t/308). Pairs with inbuxa/inbuxa-server#455. The Logs page was the generic list. It's now its own page (`src/features/logs/`): - **Structured entries:** each entry opens to show its fields, split from the tracer's `key = value, …` text (strings unquoted; nested events and lists kept whole; details that aren't pairs are shown as they are). The open entry has "Only <component>" and, where the local AI is on, Explain this. - **Levels in colour**, from the schema's `TracingLevel` colours, with the level written out. - **Filters:** level and above, component (`smtp` matches `smtp.*`, not `smtps.*`), text, from/to time. - **Follow live / Pause:** asks for the newest page every 5 s while the tab is visible; keeps up to 1,000 entries; if the newest shown entry is gone from the fresh page (a burst, or the files rotated and the ids moved), the fresh page replaces it. No new server endpoint. - **Save as file:** up to 5,000 filtered entries as `.jsonl` (fields split out) or `.log`. A server with no Log tracer still gets the note from #217. Level/component/time need server #455; everything else works with older servers. Not here: entries come from the node that answered, as before (a cluster has one log per node). A JSON line format for the Log tracer itself is a separate server issue. Checks run locally: typecheck, lint, i18n:check (31 new strings), 1132 tests (11 new), the three shell tests, build, notice-check. Not checked in a browser against a running server.
jcoffey-dev added 1 commit 2026-11-18 19:53:38 +00:00
Logs: fields, filters, live and export
ci / build (pull_request) Skipped
ci / publish (pull_request) Skipped
ci / notices (pull_request) Successful in 58s
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 1m43s
dc5b745051
The Logs page was the generic list: one long line per entry and a text
filter. It's now a page of its own:

- each entry opens to show its fields (key = value, split the way the
  Log tracer writes them, nested events and lists kept whole), with
  "Only <component>" and Explain this;
- levels carry the schema's colors;
- filters for level and above, component, text and a from/to time;
- Follow live asks for the newest page every 5 seconds while the tab is
  visible, with Pause; it keeps up to 1,000 entries and starts over when
  the log files rotate;
- Save as file writes up to 5,000 filtered entries as JSON lines (fields
  split out) or plain text.

A server with no Log tracer still gets the note from #217. The level,
component and time filters need inbuxa-server #455; text and everything
else work with older servers.

Test: unit tests for the field parser (quotes, lists, nested events, an
unescaped quote), the filter, live merging and export.
jcoffey-dev merged commit f36700c3c6 into main 2026-11-18 20:06:37 +00:00
jcoffey-dev deleted branch feat/229-logs 2026-11-18 20:06:37 +00:00
Sign in to join this conversation.