summaryrefslogtreecommitdiff
path: root/src/log_tail.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/log_tail.c')
-rw-r--r--src/log_tail.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/log_tail.c b/src/log_tail.c
index c238911..f943bbe 100644
--- a/src/log_tail.c
+++ b/src/log_tail.c
@@ -1,4 +1,5 @@
#include "log_tail.h"
+#include "filter.h"
#include "client.h"
#include "unit.h"
#include "log.h"
@@ -121,7 +122,10 @@ void log_tail_handle(int inotify_fd) {
ssize_t n;
while ((n = read(w->log_fd, buf, sizeof(buf) - 1)) > 0) {
buf[n] = '\0';
- ring_push(w->unit->output, buf, (int)n);
+ int nf = (int)n;
+ filter_apply(w->unit, buf, sizeof(buf), &nf);
+ if (nf <= 0) continue;
+ ring_push(w->unit->output, buf, nf);
client_broadcast_output(w->unit->name, buf, 0);
}