Support parsing .json
files with JSON query datetimestamp keying
#309
Labels
difficult
A difficult problem; a major coding effort or difficult algorithm to perfect
enhancement
New feature or request
file parser
Summary
s4
cannot meaningfully parse this JSONIt will match at the lines with
"datetime"
key and value only by way of line-oriented matching of the ISO 8601 datetime substring.The first log message matched will be
The second log message matched will be
This is a very imprecise match and becoming non-sensical.
Suggested behavior
Add a CLI option that specifies a JSON pathing string (think
jq
filters). For.json
files, this JSON query would be run to find the datetime.But also, how to specify what element is the log message? For the example above, how to specify that each entry under
logs
is a log message?TODO: look into jq filters and JSON querying
Additionally, the JSON querying may need to be different for different files. At teh same time, if the user is passing three JSON files that have the same query, don't force them to write that same JSON query three times on the command-line. How to have a kind of context-sensitive association from the CLI?
TODO: search clap project for an answer
The text was updated successfully, but these errors were encountered: