The parse command lets uses hyperfoil parse
to parse the input from the previous command. It can use either the name of an existing
parser factory (e.g. Jep271Factory) or a sequence of text parsing Exp using the
YAML syntax from the parse library.
- sh: cat /tmp/gc.log
- parse: Jep271Factory
...
- sh: cat /tmp/test.log
- parse:
- name: timestamp
pattern: "^(?<timestamp>\\d+)$"
eat: Line
rules: [ PreClose ]
children:
- ...
- ...The parse command will output the JSON it extracted from the input and invoke the then
commands or it will skip the then commands and pass the input to the next sibling.
|
Important
|
This is a new command and the YAML format may change if parse changes. |