svn commit: trunk/busybox/runit
vda at busybox.net
vda at busybox.net
Sun Nov 19 09:33:55 PST 2006
Author: vda
Date: 2006-11-19 09:33:54 -0800 (Sun, 19 Nov 2006)
New Revision: 16584
Log:
svlogd: log full lines to stderr too, and also stop using stdio for that
Modified:
trunk/busybox/runit/svlogd.c
Changeset:
Modified: trunk/busybox/runit/svlogd.c
===================================================================
--- trunk/busybox/runit/svlogd.c 2006-11-19 13:53:50 UTC (rev 16583)
+++ trunk/busybox/runit/svlogd.c 2006-11-19 17:33:54 UTC (rev 16584)
@@ -830,12 +830,8 @@
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 @@
/* 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);
}
More information about the busybox-cvs
mailing list