summaryrefslogtreecommitdiff
path: root/doc/logformats.md
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-07-22 23:52:52 +0300
committerPaul Buetow <paul@buetow.org>2026-07-22 23:52:52 +0300
commit3004a7100e325c006971cc2e8d0f157338c0ce5c (patch)
treeb9d2be78433b2d6e13be6344357d1f81fa9ec44b /doc/logformats.md
parent17bf7e042496a4afcbf6ee7a583378adb3ec502d (diff)
docs: DTail fork — documentation, agent guide, example configsHEADmaster
Squashed development of the documentation and example configuration: - AGENTS.md / CLAUDE.md: repository guide describing build/test/benchmark/PGO workflows and the single default read/output path (formerly "turbo"). - doc/ and docs/: query-language reference, log formats, auth-key fast reconnect, journal source reads, performance analyses (dated point-in-time records kept under historical-note disclaimers), and the turbo-vs-normal benchmark report with its result CSVs. - README.md updates; examples/ config + JSON schema aligned with the current Output* server tuning fields (the removed TurboBoost* keys dropped). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'doc/logformats.md')
-rw-r--r--doc/logformats.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/logformats.md b/doc/logformats.md
index dbf2051..29e2559 100644
--- a/doc/logformats.md
+++ b/doc/logformats.md
@@ -42,7 +42,7 @@ func newGenericKVParser(hostname, timeZoneName string, timeZoneOffset int) (*gen
return &genericKVParser{defaultParser: *defaultParser}, nil
}
-func (p *genericKVParser) MakeFields(maprLine string) (map[string]string, error) {
+func (p *genericKVParser) MakeFields(maprLine, _ string) (map[string]string, error) {
splitted := strings.Split(maprLine, protocol.FieldDelimiter)
fields := make(map[string]string, len(splitted))
@@ -70,6 +70,7 @@ func (p *genericKVParser) MakeFields(maprLine string) (map[string]string, error)
... whereas:
* `maprLine` is the whole raw log line to be parsed by the log format.
+* `sourceID` is the stable identifier of the log file / stream the line came from. Stateful parsers (e.g. CSV with a header row per file) should key their per-file state by this value; stateless parsers may ignore it.
* `protocol.FieldDelimiter` is the field delimiter used by the log format, here: `|`.
* All field names starting with `$` are variables. They store some custom values.
* All other fields are bareword-fields and are extracted from the log lines directly, e.g. `field1=value1|field2=value2|...`
@@ -139,7 +140,7 @@ func newFooParser(hostname, timeZoneName string, timeZoneOffset int) (*fooParser
return &fooParser{defaultParser: *defaultParser}, nil
}
-func (p *fooParser) MakeFields(maprLine string) (map[string]string, error) {
+func (p *fooParser) MakeFields(maprLine, sourceID string) (map[string]string, error) {
fields := make(map[string]string, 3)
..