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) {