Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Log signal info for #1569
Browse files Browse the repository at this point in the history
  • Loading branch information
the-djmaze committed Apr 30, 2024
1 parent cc36083 commit 73ac962
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions snappymail/v/0.0.0/app/libraries/MailSo/Log/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,17 +206,15 @@ public function __loggerShutDown() : void
}
}

public function signalHandler($signo)
public function signalHandler($signo, /*?array*/$siginfo = null)
{
if (\SIGTERM == $signo) {
exit;
}
if ($this->bUsed) {
foreach (static::$SIGNALS as $SIGNAL) {
if (\defined($SIGNAL) && \constant($SIGNAL) == $signo) {
$this->Write("Caught {$SIGNAL}");
break;
}
foreach (static::$SIGNALS as $SIGNAL) {
if (\defined($SIGNAL) && \constant($SIGNAL) == $signo) {
$this->Write("Caught {$SIGNAL} ".($siginfo ? \json_encode($siginfo) : ''), \LOG_CRIT, 'PHP');
break;
}
}
}
Expand Down

0 comments on commit 73ac962

Please sign in to comment.