mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 13:38:19 +00:00
Refactored formatters and updated the the writers a bit.
- Formatters have been abstracted similarly to readers and writers now. - The Ascii writer has a new option for writing out logs as JSON. - The Ascii writer now has all options availble as per-filter options as well as global.
This commit is contained in:
parent
83ec05bb4a
commit
a56c343715
25 changed files with 750 additions and 428 deletions
|
@ -6,7 +6,8 @@
|
|||
#define LOGGING_WRITER_ASCII_H
|
||||
|
||||
#include "../WriterBackend.h"
|
||||
#include "threading/AsciiFormatter.h"
|
||||
#include "threading/formatters/Ascii.h"
|
||||
#include "threading/formatters/JSON.h"
|
||||
|
||||
namespace logging { namespace writer {
|
||||
|
||||
|
@ -46,6 +47,7 @@ private:
|
|||
bool output_to_stdout;
|
||||
bool include_meta;
|
||||
bool tsv;
|
||||
bool use_json;
|
||||
|
||||
string separator;
|
||||
string set_separator;
|
||||
|
@ -53,7 +55,7 @@ private:
|
|||
string unset_field;
|
||||
string meta_prefix;
|
||||
|
||||
AsciiFormatter* ascii;
|
||||
threading::formatter::Formatter* formatter;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue