aboutsummaryrefslogtreecommitdiff
path: root/runit
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-11-19 17:33:54 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-11-19 17:33:54 +0000
commit73aad132a5e47f37fa5ff902d80233ea15e2bd6b (patch)
tree81e9d4e96ef2c44af51896aef265eb02c8e9a577 /runit
parentde8617e0fe5513b5b752572112451ba707ec5b04 (diff)
downloadbusybox-w32-73aad132a5e47f37fa5ff902d80233ea15e2bd6b.tar.gz
busybox-w32-73aad132a5e47f37fa5ff902d80233ea15e2bd6b.tar.bz2
busybox-w32-73aad132a5e47f37fa5ff902d80233ea15e2bd6b.zip
svlogd: log full lines to stderr too, and also stop using stdio for that
git-svn-id: svn://busybox.net/trunk/busybox@16584 69ca8d6d-28ef-0310-b511-8ec308f3f277
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 }