aboutsummaryrefslogtreecommitdiff
path: root/runit
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-11-19 17:33:54 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-11-19 17:33:54 +0000
commit83edaf3fd67f486381aaed6a22f5650b6f3e89f7 (patch)
tree81e9d4e96ef2c44af51896aef265eb02c8e9a577 /runit
parent22dcd04f8f9a0411934e323187a66c42de3482a0 (diff)
downloadbusybox-83edaf3fd67f486381aaed6a22f5650b6f3e89f7.tar.gz
svlogd: log full lines to stderr too, and also stop using stdio for that
Diffstat (limited to 'runit')
-rw-r--r--runit/svlogd.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/runit/svlogd.c b/runit/svlogd.c
index 8e012d239..b2fbe5167 100644
--- a/runit/svlogd.c
+++ b/runit/svlogd.c
@@ -830,12 +830,8 @@ int svlogd_main(int argc, char **argv)
if (ld->fddir == -1) continue;
if (ld->inst)
logmatch(ld);
- if (ld->matcherr == 'e') {
- fprintf(stderr, "%.*s%s",
- printlen, line,
- (ch != '\n') ? "...\n" : ""
- );
- }
+ if (ld->matcherr == 'e')
+ full_write(2, line, printlen);
if (ld->match != '+') continue;
buffer_pwrite(i, line, printlen);
}
@@ -859,6 +855,8 @@ int svlogd_main(int argc, char **argv)
/* linelen == no of chars incl. '\n' (or == stdin_cnt) */
for (i = 0; i < dirn; ++i) {
if (dir[i].fddir == -1) continue;
+ if (dir[i].matcherr == 'e')
+ full_write(2, lineptr, linelen);
if (dir[i].match != '+') continue;
buffer_pwrite(i, lineptr, linelen);
}