mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Merge remote-tracking branch 'origin/topic/bernhard/input-logging-commmon-functions'
* origin/topic/bernhard/input-logging-commmon-functions: add the last of Robins suggestions (separate info-struct for constructors). port memory leak fix from master harmonize function naming move AsciiInputOutput over to threading and thinking about it, ascii-io doesn't need the separator change constructors and factor stuff out the input framework too. factor out ascii input/output. std::string accessors to escape_sequence functionality intermediate commit - it has been over a month since I touched this... I cleaned up the AsciiInputOutput class somewhat, including renaming it to AsciiFormatter, renaming some of its methods, and turning the static methods into members for consistency. Closes #929.
This commit is contained in:
commit
762c034ec2
25 changed files with 807 additions and 597 deletions
|
@ -6,6 +6,7 @@
|
|||
#define LOGGING_WRITER_ASCII_H
|
||||
|
||||
#include "../WriterBackend.h"
|
||||
#include "threading/AsciiFormatter.h"
|
||||
|
||||
namespace logging { namespace writer {
|
||||
|
||||
|
@ -32,7 +33,6 @@ protected:
|
|||
|
||||
private:
|
||||
bool IsSpecial(string path) { return path.find("/dev/") == 0; }
|
||||
bool DoWriteOne(ODesc* desc, threading::Value* val, const threading::Field* field);
|
||||
bool WriteHeaderField(const string& key, const string& value);
|
||||
void CloseFile(double t);
|
||||
string Timestamp(double t); // Uses current time if t is zero.
|
||||
|
@ -47,20 +47,13 @@ private:
|
|||
bool include_meta;
|
||||
bool tsv;
|
||||
|
||||
char* separator;
|
||||
int separator_len;
|
||||
string separator;
|
||||
string set_separator;
|
||||
string empty_field;
|
||||
string unset_field;
|
||||
string meta_prefix;
|
||||
|
||||
char* set_separator;
|
||||
int set_separator_len;
|
||||
|
||||
char* empty_field;
|
||||
int empty_field_len;
|
||||
|
||||
char* unset_field;
|
||||
int unset_field_len;
|
||||
|
||||
char* meta_prefix;
|
||||
int meta_prefix_len;
|
||||
AsciiFormatter* ascii;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue