broker integration: add remote logging

It now works a bit differently than before: whether to send a remote log
write is now a property of the logging stream, not the logging filter
and it's now up the the receiver side filters to instantiate the desired
writer.  i.e. the sender now has no say in what the receiver should use
as the log writer backend.

Under the new style of remote logging, the "Log::enable_remote_logging"
option is repurposed to set the default behavior for new logging
streams.  There's also "Comm::{enable,disable}_remote_logging()" to
explicitly set the desired behavior for a given logging stream.  To
receive remote logs, one calls "Comm::subscribe_to_logs(<topic>)", where
senders implicitly use topics of the form "bro/log/<stream id>".
This commit is contained in:
Jon Siwek 2015-01-26 14:24:42 -06:00
parent 5df71ddc91
commit 2b598e3d5a
7 changed files with 260 additions and 12 deletions

View file

@ -157,6 +157,16 @@ public:
*/
void Terminate();
#ifdef ENABLE_BROKER
bool EnableRemoteLogs(EnumVal* stream_id, int flags);
bool DisableRemoteLogs(EnumVal* stream_id);
bool RemoteLogsAreEnabled(EnumVal* stream_id);
RecordType* StreamColumns(EnumVal* stream_id);
#endif
protected:
friend class WriterFrontend;
friend class RotationFinishedMessage;