mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
basic sqlite writer seems to work.
does not support table and vector types because SQLite has no support for arrays. also does not support rotation, etc. Not really tested thoroughly - but starting bro with Log::default_writer=Log::WRITER_SQLITE yields a couple of sqlite files that seem to contain sensible stuff.
This commit is contained in:
parent
83dcbd4aa7
commit
6e0d15b55e
5 changed files with 395 additions and 0 deletions
|
@ -21,6 +21,12 @@
|
|||
#include "writers/DataSeries.h"
|
||||
#endif
|
||||
|
||||
#define USE_SQLITE 1
|
||||
|
||||
#ifdef USE_SQLITE
|
||||
#include "writers/SQLite.h"
|
||||
#endif
|
||||
|
||||
using namespace logging;
|
||||
|
||||
// Structure describing a log writer type.
|
||||
|
@ -38,6 +44,9 @@ WriterDefinition log_writers[] = {
|
|||
#ifdef USE_DATASERIES
|
||||
{ BifEnum::Log::WRITER_DATASERIES, "DataSeries", 0, writer::DataSeries::Instantiate },
|
||||
#endif
|
||||
#ifdef USE_SQLITE
|
||||
{ BifEnum::Log::WRITER_SQLITE, "SQLite", 0, writer::SQLite::Instantiate },
|
||||
#endif
|
||||
|
||||
// End marker, don't touch.
|
||||
{ BifEnum::Log::WRITER_DEFAULT, "None", 0, (WriterBackend* (*)(WriterFrontend* frontend))0 }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue