add a filter to loggers
events are accepted by the logger if the filter accepts them the filter is optional (no filter means to accept all events)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "logger_defs.h"
|
||||
#include "handler.h"
|
||||
#include "database.h"
|
||||
#include "filter/filter.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
@@ -31,6 +32,9 @@ static void _event(void *p, event e)
|
||||
int bsize;
|
||||
int nsamples;
|
||||
|
||||
if (l->common.filter != NULL && filter_eval(l->common.filter, e) == 0)
|
||||
return;
|
||||
|
||||
subframe = e.e[l->subframe_arg].i;
|
||||
buffer = e.e[l->buffer_arg].b;
|
||||
bsize = e.e[l->buffer_arg].bsize;
|
||||
|
||||
Reference in New Issue
Block a user