inliniac/suricata — pull request #685 by inliniac (2013-12-05 14:45:04+00:00)
Title: Introduce packet logging output API

This patch introduces a new API for outputs that log based on the
packet, such as alert outputs. In converts fast-log to the new API.

The API gets rid of the concept of each logger being a thread module,
but instead there is one thread module that runs all packet loggers.

Each logger registers itself to this new API with 2 functions and the
OutputCtx object that was already used. The function pointers are:

LogFunc: the log function
ConditionFunc: this function is called before the LogFunc and only
if this returns TRUE the LogFunc is called.

For a simple alert logger like fast-log, the condition function will
simply return TRUE if p->alerts.cnt > 0.