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:
Bernhard Amann 2012-05-31 10:32:18 -07:00
parent 83dcbd4aa7
commit 6e0d15b55e
5 changed files with 395 additions and 0 deletions

View file

@ -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 }