From b582dd9b3ee7183fe6cdd767ccac3457536992a6 Mon Sep 17 00:00:00 2001 From: Wisp X Date: Sat, 5 Mar 2022 23:05:37 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E5=A2=9E=E5=8A=A0=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=BC=82=E5=B8=B8=E7=9A=84=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/Install.php | 2 +- app/Http/Controllers/Controller.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/Install.php b/app/Console/Commands/Install.php index 13fab93e..f8d56b46 100644 --- a/app/Console/Commands/Install.php +++ b/app/Console/Commands/Install.php @@ -94,7 +94,7 @@ class Install extends Command } catch (\Throwable $e) { $this->warn("Installation error!\n"); $this->error($e->getMessage()); - Log::error('安装程序时出现异常', [ + Log::error('执行数据库安装程序时出现异常', [ 'file' => $e->getFile(), 'line' => $e->getLine(), 'msg' => $e->getMessage(), diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 75f5c2c3..b52850e7 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -96,6 +96,12 @@ class Controller extends BaseController $user->save(); } catch (\Throwable $e) { @unlink(base_path('installed.lock')); + Log::error('执行安装程序时出现异常', [ + 'file' => $e->getFile(), + 'line' => $e->getLine(), + 'msg' => $e->getMessage(), + 'trace' => $e->getTraceAsString(), + ]); return $this->error($e->getMessage()); } if (! $exitCode) {