mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
logging/Manager: Extract another CreateWriter() helper
For other cluster backends, CreateWriter() will use a logger's filter configuration rather than receiving all configuration through CreateLog. Extract a helper out from WriteToFilters() for reuse.
This commit is contained in:
parent
16cca62292
commit
78999d147d
2 changed files with 66 additions and 46 deletions
|
@ -378,6 +378,23 @@ private:
|
|||
struct Stream;
|
||||
struct WriterInfo;
|
||||
|
||||
/**
|
||||
* Helper enum for CreateWriterForFilter to avoid bool params.
|
||||
*/
|
||||
enum class WriterOrigin {
|
||||
REMOTE,
|
||||
LOCAL,
|
||||
};
|
||||
|
||||
/**
|
||||
* Helper to create a new writer for a filter with the given path.
|
||||
*
|
||||
* @param filter the filter for which to create the writer.
|
||||
* @param path the path for the new writer
|
||||
* @param from whether instantiated for a remote log, or locally created.
|
||||
*/
|
||||
WriterFrontend* CreateWriterForFilter(Filter* filter, const std::string& path, WriterOrigin origin);
|
||||
|
||||
bool TraverseRecord(Stream* stream, Filter* filter, RecordType* rt, TableVal* include, TableVal* exclude,
|
||||
const std::string& path, const std::list<int>& indices);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue