summaryrefslogtreecommitdiff
path: root/src/logger.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-08-21 03:57:47 +0200
committerLennart Poettering <lennart@poettering.net>2010-08-21 03:57:47 +0200
commitaddab137cd8d318e4f543ca56018ee23d51aaca9 (patch)
tree650370b8b0ad99a1c4715ba9f47b53a0d5e2f077 /src/logger.c
parent8e4d105ddfd53fa146e03cee9d6fcc2e932975ac (diff)
syslog: add minimal syslog/kmsg bridge syslogd
Diffstat (limited to 'src/logger.c')
-rw-r--r--src/logger.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/logger.c b/src/logger.c
index 95d58fc1b3..5a28c2197f 100644
--- a/src/logger.c
+++ b/src/logger.c
@@ -38,7 +38,6 @@
#include "sd-daemon.h"
#include "tcpwrap.h"
-#define STREAM_BUFFER 2048
#define STREAMS_MAX 256
#define SERVER_FD_MAX 16
#define TIMEOUT ((int) (10*MSEC_PER_SEC))
@@ -85,7 +84,7 @@ struct Stream {
bool prefix;
- char buffer[STREAM_BUFFER];
+ char buffer[LINE_MAX];
size_t length;
LIST_FIELDS(Stream, stream);
@@ -297,7 +296,7 @@ static int stream_process(Stream *s, usec_t ts) {
int r;
assert(s);
- if ((l = read(s->fd, s->buffer+s->length, STREAM_BUFFER-s->length)) < 0) {
+ if ((l = read(s->fd, s->buffer+s->length, LINE_MAX-s->length)) < 0) {
if (errno == EAGAIN)
return 0;
@@ -617,7 +616,7 @@ int main(int argc, char *argv[]) {
r = 0;
- log_info("systemd-logger stopped as pid %lu", (unsigned long) getpid());
+ log_debug("systemd-logger stopped as pid %lu", (unsigned long) getpid());
fail:
sd_notify(false,