From 41e91b16de35a4c7e3a0e2c6b9720424e12ea0e9 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Thu, 5 Jan 2023 03:28:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E6=9B=B4=E5=A4=9A?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/Cluster/Log.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/Cluster/Log.php b/app/Console/Commands/Cluster/Log.php index 9c102df..bf4db4f 100644 --- a/app/Console/Commands/Cluster/Log.php +++ b/app/Console/Commands/Cluster/Log.php @@ -38,7 +38,7 @@ public function handle(): int private function format(string $event, array $message = []) { - $status = $this->switch($event); + $status = $this->switch($event, $message['data']); if (!$status) { return; @@ -49,7 +49,7 @@ private function format(string $event, array $message = []) $this->info($message); } - public function switch($event): string|null + public function switch($event, $message = []): string|null { $events = [ 'node.ok' => '此节点初始化成功,并且已经加入集群。', @@ -58,7 +58,9 @@ public function switch($event): string|null 'cluster_ready.ok' => 'Cluster Ready 就绪了,已经可以处理请求了。', 'config.updated' => '集群配置文件已经更新,请所有 slave 节点下载。', 'config.synced' => '我已下载配置文件。', - 'edge.deployed' => '边缘节点已经部署,已经成功根据集群节点生成配置文件并应用。', + 'edge.deployed' => '已成功根据集群节点生成配置文件并应用。', + 'edge.launched' => '边缘节点成功启动。', + 'edge.error' => $message['data']['message'], ]; return $events[$event] ?? null;