fxnn/gowatch

Add tag when predicate matches

Opened this issue · 0 comments

fxnn commented

While currently, one can only add tags to each line of a logfile, it should be possible to add tags only to lines matching a given predicate.

Though this is currently possible by parsing the same file multiple times with different predicates, that's not the way it's supposed to work.

Possible syntax would be

logfiles:
- filename: /path/to/file.log
  tags:
  - tag_for_each_line
  - tag_for_few_lines: {
      Message: { contains: some text }
    }

Alternatively, we could provide this feature only by using an extended mapping section, in addition to the existing logfiles and summary sections.

(Note, that this already uses the new predicate syntax from #4)