mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-16 06:48:31 +00:00
Add timestamp in function outputs
This commit is contained in:
@@ -2,6 +2,7 @@ local mod = {}
|
||||
|
||||
function mod.syslog(evt, level, format)
|
||||
nixio = require("nixio")
|
||||
format = "%evt.time: "..format
|
||||
formatter = digwatch.formatter(format)
|
||||
msg = digwatch.format_event(evt, formatter)
|
||||
nixio.syslog(level, msg)
|
||||
@@ -14,6 +15,8 @@ function mod.first_sequence(evt, fieldname, key, format)
|
||||
local field_value = digwatch.field(evt, fieldname)
|
||||
local now = os.time()
|
||||
|
||||
format = "%evt.time: "..format
|
||||
|
||||
if first_sequence_state[key] == nil then
|
||||
first_sequence_state[key] = {}
|
||||
end
|
||||
|
Reference in New Issue
Block a user