logger.c 354 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
#include "logger.h"
#include "logger_defs.h"
#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
12
13
14
15
16
17

void logger_set_filter(logger *_l, void *filter)
{
  struct logger *l = _l;
  l->filter = filter;
}