mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-06 09:12:20 +00:00
Skip output json format (#342)
* Add option to exclude output property in json fmt New falco.yaml option json_include_output_property controls where the formatted string "output" is included in the json object when json output is enabled. By default the string is included. * Add tests for new json output option New test sets json_include_output_property to false and then verifies that the json output does *not* contain the surrounding text "Warning an open...".
This commit is contained in:
@@ -31,7 +31,7 @@ class sinsp_evt_formatter;
|
||||
class falco_formats
|
||||
{
|
||||
public:
|
||||
static void init(sinsp* inspector, lua_State *ls, bool json_output);
|
||||
static void init(sinsp* inspector, lua_State *ls, bool json_output, bool json_include_output_property);
|
||||
|
||||
// formatter = falco.formatter(format_string)
|
||||
static int formatter(lua_State *ls);
|
||||
@@ -48,4 +48,5 @@ class falco_formats
|
||||
static sinsp* s_inspector;
|
||||
static sinsp_evt_formatter_cache *s_formatters;
|
||||
static bool s_json_output;
|
||||
static bool s_json_include_output_property;
|
||||
};
|
||||
|
Reference in New Issue
Block a user