about summary refs log tree commit homepage
path: root/lib/PublicInbox/HTTP.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-08-08 23:53:08 +0000
committerEric Wong <e@80x24.org>2022-08-09 16:41:51 +0000
commit60d262483a4d6ddf295f5124aed3672866795ee5 (patch)
tree191993a87300db06ce44ff566142e37b1ec67f28 /lib/PublicInbox/HTTP.pm
parent86389293edbe3273b3ff0f61cbeb9cb6a0dfe2f2 (diff)
downloadpublic-inbox-60d262483a4d6ddf295f5124aed3672866795ee5.tar.gz
This allows "-l $ADDRESS?err=/path/to/err.log to isolate normal
warn() (and carp()) messages for a particular listen address to
track down errors more easily.
Diffstat (limited to 'lib/PublicInbox/HTTP.pm')
-rw-r--r--lib/PublicInbox/HTTP.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/HTTP.pm b/lib/PublicInbox/HTTP.pm
index 3d4e3499..0dba425d 100644
--- a/lib/PublicInbox/HTTP.pm
+++ b/lib/PublicInbox/HTTP.pm
@@ -69,7 +69,7 @@ sub new ($$$) {
 
 sub event_step { # called by PublicInbox::DS
         my ($self) = @_;
-
+        local $SIG{__WARN__} = $self->{srv_env}->{'pi-httpd.warn_cb'};
         return unless $self->flush_write && $self->{sock};
 
         # only read more requests if we've drained the write buffer,