Skip to content

Add new JSON log formatter QW_LOG_FORMAT=DDG#6215

Open
PSeitz wants to merge 1 commit intoquickwit-oss:mainfrom
PSeitz:logs_format
Open

Add new JSON log formatter QW_LOG_FORMAT=DDG#6215
PSeitz wants to merge 1 commit intoquickwit-oss:mainfrom
PSeitz:logs_format

Conversation

@PSeitz
Copy link
Collaborator

@PSeitz PSeitz commented Mar 24, 2026

The existing JSON formatter (QW_LOG_FORMAT=json) produces deeply nested JSON with separate span objects. This makes logs hard to search and filter.

The new DDG formatter outputs a flat JSON object with four fields:

  • timestamp: RFC 3339
  • level: log level (INFO, WARN, ERROR, ...)
  • service: crate name extracted from the tracing target
  • message: the full text-formatted log line (level, target, spans, fields)

The message reuses tracing's standard Full formatter, so it matches the regular text output minus the timestamp.

It can be enabled by setting QW_LOG_FORMAT=DDG

The existing JSON formatter (`QW_LOG_FORMAT=json`) produces deeply nested
JSON with separate span objects. This makes logs hard to search and filter.

The new DDG formatter outputs a flat JSON object with four fields:
- `timestamp`: RFC 3339
- `level`: log level (INFO, WARN, ERROR, ...)
- `service`: crate name extracted from the tracing target
- `message`: the full text-formatted log line (level, target, spans, fields)

The message reuses tracing's standard Full formatter, so it matches
the regular text output minus the timestamp.
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.

1 participant