From 73740c9e97efdd98e87a1d52fc064bffe449be83 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 3 Sep 2021 08:54:20 +0000 Subject: lei: dump errors to syslog, and not to CLI Dumping errors from the previous run can often get lost, so just spew to syslog since it's a standard place to put errors that don't make it to a client. Note: we don't rely on $SIG{__WARN__} since some of the Net:: stuff will write directly to STDERR (as will external processes). --- lib/PublicInbox/LeiStoreErr.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/LeiStoreErr.pm') diff --git a/lib/PublicInbox/LeiStoreErr.pm b/lib/PublicInbox/LeiStoreErr.pm index 5f9ba24d..cc085fdc 100644 --- a/lib/PublicInbox/LeiStoreErr.pm +++ b/lib/PublicInbox/LeiStoreErr.pm @@ -2,7 +2,7 @@ # License: AGPL-3.0+ # forwards stderr from lei/store process to any lei clients using -# the same store +# the same store, falls back to syslog if no matching clients exist. package PublicInbox::LeiStoreErr; use strict; use v5.10.1; @@ -31,7 +31,7 @@ sub event_step { print $err $$rbuf and $printed = 1; } if (!$printed) { - openlog('lei-store', 'pid,nowait,nofatal,ndelay', 'user'); + openlog('lei/store', 'pid,nowait,nofatal,ndelay', 'user'); for my $l (split(/\n/, $$rbuf)) { syslog('warning', '%s', $l) } closelog(); # don't share across fork } -- cgit v1.2.3-24-ge0c7