]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei: dump and clear log at exit
authorEric Wong <e@80x24.org>
Tue, 7 Sep 2021 11:32:09 +0000 (11:32 +0000)
committerEric Wong <e@80x24.org>
Tue, 7 Sep 2021 13:30:49 +0000 (13:30 +0000)
This may be helpful for diagnosing errors in case we missed any.

lib/PublicInbox/LEI.pm

index 098a45ba585decba83030d4c63033190cc249aff..bd44cfaeb662046377b58dec6cda9a4af4bc8311 100644 (file)
@@ -1330,6 +1330,7 @@ sub lazy_start {
        open STDOUT, '>&STDIN' or die "redirect stdout failed: $!";
        # $daemon pipe to `lei' closed, main loop begins:
        PublicInbox::DS->EventLoop;
+       dump_and_clear_log();
        exit($exit_code // 0);
 }