From 8201af08fa09c2bd0f005fbe262f27e2c5bd2d86 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Sun, 22 Jun 2014 13:36:31 -0400 Subject: journal-remote: allow splitting incoming logs by source host Previously existing scheme where the file name would be based on the source was just too ugly and unpredicatable. Now there are only two options: 1. just one file (until rotation), 2. one file per source host, using the hostname as filename part. For the cases where the source is specified by the user, only option one is allowed, and the full of the file must be specified. --- src/journal-remote/journal-remote-parse.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/journal-remote/journal-remote-parse.c') diff --git a/src/journal-remote/journal-remote-parse.c b/src/journal-remote/journal-remote-parse.c index fe21bd3e1d..a08ca2fdcb 100644 --- a/src/journal-remote/journal-remote-parse.c +++ b/src/journal-remote/journal-remote-parse.c @@ -30,11 +30,14 @@ void source_free(RemoteSource *source) { if (source->fd >= 0) { log_debug("Closing fd:%d (%s)", source->fd, source->name); - close(source->fd); + safe_close(source->fd); } free(source->name); free(source->buf); iovw_free_contents(&source->iovw); + + sd_event_source_unref(source->event); + free(source); } -- cgit v1.2.3-54-g00ecf