I'm using lnav to filter and query on top of the custom log file we have created. As this is a custom log file, I need to create a custom format file and install it using below command to define the structure of the log entries.
lanv -i custom_format.json
Custom format JSON: https://pastebin.com/z7sCVqxd
Though this is working at the high level, I would also like to apply filters using the parameters that are present in body JSON.
The body parameter I've mentioned in the custom formatter is JSON. Not the entire log entry is JSON but only the body parameter value alone is the JSON., In the body parameter only the log level, message and other useful information are present.
Is it possible to use something like,
"level-field" : body.level,
"level" : {
"error" : "error",
"warning" : "info"
},
And also how to define other parameters from the body json to Value for defining "kind" and "identifier" or not
Thanks