mirror of
https://github.com/falcosecurity/falco.git
synced 2025-06-28 23:57:29 +00:00
Allow missing output fields.
Add a leading * to the format string so output with missing fields is just displayed with '<NA>' values instead of being aborted. This fixes #42.
This commit is contained in:
parent
fda5162061
commit
594d3d66d5
@ -5,7 +5,7 @@ levels = {"Emergency", "Alert", "Critical", "Error", "Warning", "Notice", "Infor
|
|||||||
local outputs = {}
|
local outputs = {}
|
||||||
|
|
||||||
function mod.stdout(evt, level, format)
|
function mod.stdout(evt, level, format)
|
||||||
format = "%evt.time: "..levels[level+1].." "..format
|
format = "*%evt.time: "..levels[level+1].." "..format
|
||||||
formatter = falco.formatter(format)
|
formatter = falco.formatter(format)
|
||||||
msg = falco.format_event(evt, formatter)
|
msg = falco.format_event(evt, formatter)
|
||||||
print (msg)
|
print (msg)
|
||||||
|
Loading…
Reference in New Issue
Block a user