summaryrefslogtreecommitdiff
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-w32-83edaf3fd67f486381aaed6a22f5650b6f3e89f7.tar.gz
busybox-w32-83edaf3fd67f486381aaed6a22f5650b6f3e89f7.tar.bz2
busybox-w32-83edaf3fd67f486381aaed6a22f5650b6f3e89f7.zip
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)
830 if (ld->fddir == -1) continue; 830 if (ld->fddir == -1) continue;
831 if (ld->inst) 831 if (ld->inst)
832 logmatch(ld); 832 logmatch(ld);
833 if (ld->matcherr == 'e') { 833 if (ld->matcherr == 'e')
834 fprintf(stderr, "%.*s%s", 834 full_write(2, line, printlen);
835 printlen, line,
836 (ch != '\n') ? "...\n" : ""
837 );
838 }
839 if (ld->match != '+') continue; 835 if (ld->match != '+') continue;
840 buffer_pwrite(i, line, printlen); 836 buffer_pwrite(i, line, printlen);
841 } 837 }
@@ -859,6 +855,8 @@ int svlogd_main(int argc, char **argv)
859 /* linelen == no of chars incl. '\n' (or == stdin_cnt) */ 855 /* linelen == no of chars incl. '\n' (or == stdin_cnt) */
860 for (i = 0; i < dirn; ++i) { 856 for (i = 0; i < dirn; ++i) {
861 if (dir[i].fddir == -1) continue; 857 if (dir[i].fddir == -1) continue;
858 if (dir[i].matcherr == 'e')
859 full_write(2, lineptr, linelen);
862 if (dir[i].match != '+') continue; 860 if (dir[i].match != '+') continue;
863 buffer_pwrite(i, lineptr, linelen); 861 buffer_pwrite(i, lineptr, linelen);
864 } 862 }