diff options
author | Eric Wong <e@80x24.org> | 2021-09-03 08:54:20 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-03 08:55:03 +0000 |
commit | 73740c9e97efdd98e87a1d52fc064bffe449be83 (patch) | |
tree | be0d6bd5596a68f801d9b5715114bd6b0531ab5c /lib/PublicInbox/LeiStoreErr.pm | |
parent | 9b2c705f92a6baf33684aa0845dc5163ae31016e (diff) | |
download | public-inbox-73740c9e97efdd98e87a1d52fc064bffe449be83.tar.gz |
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).
Diffstat (limited to 'lib/PublicInbox/LeiStoreErr.pm')
-rw-r--r-- | lib/PublicInbox/LeiStoreErr.pm | 4 |
1 files changed, 2 insertions, 2 deletions
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+ <https://www.gnu.org/licenses/agpl-3.0.txt> # 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 } |