X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal-remote%2Fjournal-remote-parse.c;h=76407f711b7664b5756b54b002f2818d2b654cf5;hb=a7e07206021c6484a8d33c6ee156ecfb5b90534c;hp=224e8f140bd06d5d5ef7f781004cc93ea8a942b3;hpb=dd87b1840c966fd25b81a7aa1071e8488c624db8;p=elogind.git diff --git a/src/journal-remote/journal-remote-parse.c b/src/journal-remote/journal-remote-parse.c index 224e8f140..76407f711 100644 --- a/src/journal-remote/journal-remote-parse.c +++ b/src/journal-remote/journal-remote-parse.c @@ -125,7 +125,7 @@ static int get_line(RemoteSource *source, char **line, size_t *size) { source->size - source->filled); if (n < 0) { if (errno != EAGAIN && errno != EWOULDBLOCK) - log_error("read(%d, ..., %zd): %m", source->fd, + log_error_errno(errno, "read(%d, ..., %zd): %m", source->fd, source->size - source->filled); return -errno; } else if (n == 0) @@ -186,7 +186,7 @@ static int fill_fixed_size(RemoteSource *source, void **data, size_t size) { source->size - source->filled); if (n < 0) { if (errno != EAGAIN && errno != EWOULDBLOCK) - log_error("read(%d, ..., %zd): %m", source->fd, + log_error_errno(errno, "read(%d, ..., %zd): %m", source->fd, source->size - source->filled); return -errno; } else if (n == 0) @@ -330,7 +330,7 @@ int process_data(RemoteSource *source) { assert(line[n-1] == '\n'); if (n == 1) { - log_debug("Received empty line, event is ready"); + log_trace("Received empty line, event is ready"); return 1; } @@ -350,7 +350,7 @@ int process_data(RemoteSource *source) { else /* replace \n with = */ line[n-1] = '='; - log_debug("Received: %.*s", (int) n, line); + log_trace("Received: %.*s", (int) n, line); r = iovw_put(&source->iovw, line, n); if (r < 0) { @@ -438,7 +438,7 @@ int process_source(RemoteSource *source, bool compress, bool seal) { return r; /* We have a full event */ - log_debug("Received a full event from source@%p fd:%d (%s)", + log_trace("Received a full event from source@%p fd:%d (%s)", source, source->fd, source->name); if (!source->iovw.count) { @@ -451,8 +451,8 @@ int process_source(RemoteSource *source, bool compress, bool seal) { r = writer_write(source->writer, &source->iovw, &source->ts, compress, seal); if (r < 0) - log_error("Failed to write entry of %zu bytes: %s", - iovw_size(&source->iovw), strerror(-r)); + log_error_errno(r, "Failed to write entry of %zu bytes: %m", + iovw_size(&source->iovw)); else r = 1;