变更
This commit is contained in:
@@ -128,7 +128,7 @@ class AsyncServer implements ServerInterface
|
|||||||
|
|
||||||
$this->server->set($this->systemConfig($config, $daemon));
|
$this->server->set($this->systemConfig($config, $daemon));
|
||||||
|
|
||||||
$this->logger->alert('Listen ' . $config->type . ' address ' . $config->host . '::' . $config->port);
|
\Kiri::getLogger()->alert('Listen ' . $config->type . ' address ' . $config->host . '::' . $config->port);
|
||||||
|
|
||||||
$this->onEventListen($this->server, Config::get('server.events', []));
|
$this->onEventListen($this->server, Config::get('server.events', []));
|
||||||
$this->onEventListen($this->server, $config->events);
|
$this->onEventListen($this->server, $config->events);
|
||||||
@@ -171,7 +171,7 @@ class AsyncServer implements ServerInterface
|
|||||||
throw new Exception('Listen port fail.' . swoole_last_error());
|
throw new Exception('Listen port fail.' . swoole_last_error());
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->logger->alert('Listen ' . $config->type . ' address ' . $config->host . '::' . $config->port);
|
\Kiri::getLogger()->alert('Listen ' . $config->type . ' address ' . $config->host . '::' . $config->port);
|
||||||
|
|
||||||
$port->set($this->resetSettings($config->type, $config->settings));
|
$port->set($this->resetSettings($config->type, $config->settings));
|
||||||
|
|
||||||
@@ -187,10 +187,10 @@ class AsyncServer implements ServerInterface
|
|||||||
public function onSigint($no, array $signInfo): void
|
public function onSigint($no, array $signInfo): void
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->logger->alert('Pid ' . getmypid() . ' get signo ' . $no);
|
\Kiri::getLogger()->alert('Pid ' . getmypid() . ' get signo ' . $no);
|
||||||
$this->shutdown();
|
$this->shutdown();
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
$this->logger->error($exception->getMessage());
|
\Kiri::getLogger()->error($exception->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -144,10 +144,10 @@ class CoroutineServer implements ServerInterface
|
|||||||
public function onSigint($no, array $signInfo): void
|
public function onSigint($no, array $signInfo): void
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->logger->alert('Pid ' . getmypid() . ' get signo ' . $no);
|
\Kiri::getLogger()->alert('Pid ' . getmypid() . ' get signo ' . $no);
|
||||||
$this->shutdown();
|
$this->shutdown();
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
$this->logger->error($exception->getMessage());
|
\Kiri::getLogger()->error($exception->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ class OnServerWorker extends \Kiri\Server\Abstracts\Server
|
|||||||
$worker_id, $worker_pid, $signal, $exit_code, swoole_strerror(swoole_last_error(), 9)
|
$worker_id, $worker_pid, $signal, $exit_code, swoole_strerror(swoole_last_error(), 9)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->logger->error($message);
|
\Kiri::getLogger()->error($message);
|
||||||
|
|
||||||
$this->system_mail($message);
|
$this->system_mail($message);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user