New function Log::get_filter() that allows to retrieve previously

installed filter by name.

This filter can then be modified and reinstalled via add_filter(),
which will replace the old one with the same name.
This commit is contained in:
Robin Sommer 2011-03-08 17:26:37 -08:00
parent b8ee425e0d
commit 5d8b9f2e74
5 changed files with 69 additions and 4 deletions

View file

@ -68,7 +68,8 @@ public:
// actual BiFs just forward here.
bool CreateStream(EnumVal* id, RecordVal* stream);
bool AddFilter(EnumVal* id, RecordVal* filter);
bool RemoveFilter(EnumVal* id, StringVal* filter);
bool RemoveFilter(EnumVal* id, StringVal* name);
bool RemoveFilter(EnumVal* id, string name);
bool Write(EnumVal* id, RecordVal* columns);
bool SetBuf(EnumVal* id, bool enabled); // Changes the state for all writers for that stream.
bool Flush(EnumVal* id); // Flushes all writers for the stream.
@ -100,6 +101,7 @@ private:
void InstallRotationTimer(WriterInfo* winfo);
void Rotate(WriterInfo* info);
RecordVal* LookupRotationControl(EnumVal* writer, string path);
Filter* FindFilter(EnumVal* id, StringVal* filter);
vector<Stream *> streams; // Indexed by stream enum.
};