mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58:20 +00:00
Add LogAscii::json_include_unset_fields flag to control unset field rendering
The flag controls whether JSON rendering includes unset &optional log fields (F, the default), or includes them with a null value (T).
This commit is contained in:
parent
7a6501296b
commit
1aaed1cc2e
9 changed files with 62 additions and 12 deletions
|
@ -26,7 +26,7 @@ public:
|
|||
// elasticsearch).
|
||||
};
|
||||
|
||||
JSON(MsgThread* t, TimeFormat tf);
|
||||
JSON(MsgThread* t, TimeFormat tf, bool include_unset_fields = false);
|
||||
~JSON() override;
|
||||
|
||||
bool Describe(ODesc* desc, Value* val, const std::string& name = "") const override;
|
||||
|
@ -50,6 +50,7 @@ private:
|
|||
|
||||
TimeFormat timestamps;
|
||||
bool surrounding_braces;
|
||||
bool include_unset_fields;
|
||||
};
|
||||
|
||||
} // namespace zeek::threading::formatter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue