Events-processing output: Difference between revisions
Line 15: | Line 15: | ||
cat ./file.txt | some-parser [output] -o <''output-format''> | cat ./file.txt | some-parser [output] -o <''output-format''> | ||
If no output format is specified, the output procedure will inspect the event, and will try to use, in order | If no output format is specified, the output procedure will inspect the event, and will try to use, in order: the preferred representation, as returned by the event (if any), the raw representation, as returned by event (if any) and then a simple representation consisting in the event's timestamp, if available, and then the event's toString() invocation result. | ||
=Output Format= | =Output Format= |
Revision as of 01:15, 4 August 2017
Internal
Overview
The default procedure to handle event streams: the procedure inspects the events and sends their string representation to the configured output stream.
The procedure can be configured with an output format.
One way to provide the format specification is on command-line: format specification arguments follow the "-o" marker and end either with the last argument or when a higher level argument (file, for example) is encountered.
some-parser [output] -o <output-format> ./file.txt
cat ./file.txt | some-parser [output] -o <output-format>
If no output format is specified, the output procedure will inspect the event, and will try to use, in order: the preferred representation, as returned by the event (if any), the raw representation, as returned by event (if any) and then a simple representation consisting in the event's timestamp, if available, and then the event's toString() invocation result.
Output Format
The output format can be used to:
- Restrict the output to specific event properties.
- Restrict the output to specific event types.