mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-13 13:32:50 +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:
@@ -5,7 +5,7 @@ levels = {"Emergency", "Alert", "Critical", "Error", "Warning", "Notice", "Infor
|
||||
local outputs = {}
|
||||
|
||||
function mod.stdout(evt, level, format)
|
||||
format = "%evt.time: "..levels[level+1].." "..format
|
||||
format = "*%evt.time: "..levels[level+1].." "..format
|
||||
formatter = falco.formatter(format)
|
||||
msg = falco.format_event(evt, formatter)
|
||||
print (msg)
|
||||
|
Reference in New Issue
Block a user