logger.c 407 Bytes
Newer Older
1 2
#include "logger.h"
#include "logger_defs.h"
3
#include "filter/filter.h"
4 5 6 7 8 9 10 11 12
#include <stdlib.h>

void logger_add_view(logger *_l, view *v)
{
  struct logger *l = _l;
  l->vsize++;
  l->v = realloc(l->v, l->vsize * sizeof(view *)); if (l->v == NULL) abort();
  l->v[l->vsize-1] = v;
}
Cedric Roux's avatar
Cedric Roux committed
13 14 15 16

void logger_set_filter(logger *_l, void *filter)
{
  struct logger *l = _l;
17
  free_filter(l->filter);
Cedric Roux's avatar
Cedric Roux committed
18 19
  l->filter = filter;
}