summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2023-09-05 14:39:21 +0300
committerPaul Buetow <pbuetow@mimecast.com>2023-09-07 15:32:23 +0300
commitd427574824a1a4b6a5a0e15a3696f3df1c698424 (patch)
tree45d3bf098c2b69f4aa47fcdeac03ea67cee7c39a /doc
parentbf39452c1f9a06d9f4e6eb3a06a23068a2451ca5 (diff)
Add `custom1` and `custom2` log formats.
Diffstat (limited to 'doc')
-rw-r--r--doc/logformats.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/logformats.md b/doc/logformats.md
index 9d4e55d..839b050 100644
--- a/doc/logformats.md
+++ b/doc/logformats.md
@@ -148,4 +148,6 @@ func (p *fooParser) MakeFields(maprLine string) (map[string]string, error) {
}
```
+Next, `NewParser(...)` in `internal/mapr/logformat/parser.go` needs to be extended, so that the new log format is part of the switch statement. If you don't want to edit `parser.go` then you could instead use `custom1` or `custom2` log formats, there are ready templates available in the `logformat` package.
+
Once done, recompile DTail. DTail now understands `... logformat foo` (see "Seleting a log format" above).