Log tracer: a JSON line format option #456

Closed
opened 2026-11-18 19:54:27 +00:00 by jcoffey-dev · 1 comment
Owner

Split out of inbuxa/inbuxa-admin#229 (forum t/308).

The Log tracer writes text only: <time> <LEVEL> <description> (<event id>) key = value, …. The console's Logs page now splits those fields itself (inbuxa-admin#244), but the text isn't fully unambiguous (a quote inside a string isn't escaped), and log collectors (Loki, Vector, Kubernetes) want one JSON object per line.

Proposal: a format setting on the Log tracer, text (default, as today) or json: one object per line with timestamp, level, event, description and the event's keys as typed values (nested events as objects, lists as arrays). x:Log reads either format, so the console's Logs page keeps working, and gets exact fields from JSON files.

Done when

  • A Log tracer with format = json writes one JSON object per line
  • x:Log/get and x:Log/query (incl. the #455 filters) read JSON files as well as text
  • The console shows fields from JSON entries without parsing text
Split out of inbuxa/inbuxa-admin#229 (forum t/308). The Log tracer writes text only: `<time> <LEVEL> <description> (<event id>) key = value, …`. The console's Logs page now splits those fields itself (inbuxa-admin#244), but the text isn't fully unambiguous (a quote inside a string isn't escaped), and log collectors (Loki, Vector, Kubernetes) want one JSON object per line. **Proposal:** a `format` setting on the Log tracer, `text` (default, as today) or `json`: one object per line with `timestamp`, `level`, `event`, `description` and the event's keys as typed values (nested events as objects, lists as arrays). `x:Log` reads either format, so the console's Logs page keeps working, and gets exact fields from JSON files. **Done when** - A Log tracer with `format = json` writes one JSON object per line - `x:Log/get` and `x:Log/query` (incl. the #455 filters) read JSON files as well as text - The console shows fields from JSON entries without parsing text
jcoffey-dev added this to the 27.7 milestone 2026-11-18 19:54:27 +00:00
jcoffey-dev added the enhancement
priority
p3
labels 2026-11-18 19:54:27 +00:00
jcoffey-dev self-assigned this 2026-11-18 20:40:14 +00:00
Author
Owner

Fixed in #462, with the Logs page side in inbuxa/inbuxa-admin#246. Thanks to StefanSa for asking for this in community t/308.

A Log tracer now has a Format setting: Text (the default, unchanged) or JSON lines, one object per line with timestamp, level, event, description and the event's fields under data as typed values. The console's Logs page and x:Log read both formats, including a file that holds both after a switch, and show a JSON entry's fields exactly as written. The Console (stdout) tracer still writes text only.

It ships in the next server and console release candidates.

Fixed in #462, with the Logs page side in inbuxa/inbuxa-admin#246. Thanks to StefanSa for asking for this in community t/308. A Log tracer now has a **Format** setting: Text (the default, unchanged) or JSON lines, one object per line with `timestamp`, `level`, `event`, `description` and the event's fields under `data` as typed values. The console's Logs page and `x:Log` read both formats, including a file that holds both after a switch, and show a JSON entry's fields exactly as written. The Console (stdout) tracer still writes text only. It ships in the next server and console release candidates.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: inbuxa/inbuxa-server#456