From 184629d15bd3fe8906667f06aba836b80a9962d4 Mon Sep 17 00:00:00 2001 From: vasya Date: Sat, 11 Apr 2026 22:40:34 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B2=D1=8B=D0=B5=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=BF=D1=8B=D1=82=D0=BA=D0=B8=20=D0=BE=D1=80=D0=B3=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D1=8C=20=D1=80=D0=B0?= =?UTF-8?q?=D0=B1=D0=BE=D1=82=D1=83=20=D1=81=20=D0=B7=D0=B0=D0=BF=D1=83?= =?UTF-8?q?=D1=81=D0=BA=D0=BE=D0=BC=20=D0=BF=D1=80=D0=BE=D1=86=D0=B5=D1=81?= =?UTF-8?q?=D1=81=D0=BE=D0=B2=20=D0=BF=D0=BE=20=D1=80=D0=B0=D1=81=D0=BF?= =?UTF-8?q?=D0=B8=D1=81=D0=B0=D0=BD=D0=B8=D1=8E.=20=D0=9F=D0=BE=D0=BD?= =?UTF-8?q?=D0=B8=D0=BC=D0=B0=D1=8E,=20=D1=87=D1=82=D0=BE=20=D1=8D=D1=82?= =?UTF-8?q?=D0=BE=20=D0=BD=D0=B5=20=D1=81=D0=BE=D0=B2=D1=81=D0=B5=D0=BC=20?= =?UTF-8?q?=D0=BD=D0=B5=20redis,=20=D0=BD=D0=BE=20=D0=BF=D0=BE=20=D1=81?= =?UTF-8?q?=D0=BC=D1=8B=D1=81=D0=BB=D1=83=20=D0=B1=D0=BB=D0=B8=D0=B7=D0=BA?= =?UTF-8?q?=D0=BE,=20=D0=B0=20=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=B2=D0=B0?= =?UTF-8?q?=D1=82=D1=8C=20=D0=B2=D0=B5=D1=82=D0=BA=D1=83=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=B4=20=D0=B5=D0=B4=D0=B8=D0=BD=D1=81=D1=82=D0=B2=D0=B5=D0=BD?= =?UTF-8?q?=D0=BD=D1=8B=D0=B9=D1=8B=20=D1=81=D0=BA=D1=80=D0=B8=D0=BF=D1=82?= =?UTF-8?q?=20=D0=BD=D0=B5=20=D1=85=D0=BE=D1=82=D0=B5=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/BaseScheduleCommand.php | 48 ++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 app/Console/Commands/BaseScheduleCommand.php diff --git a/app/Console/Commands/BaseScheduleCommand.php b/app/Console/Commands/BaseScheduleCommand.php new file mode 100644 index 0000000..0b9e279 --- /dev/null +++ b/app/Console/Commands/BaseScheduleCommand.php @@ -0,0 +1,48 @@ +logExecErr($th); + } + } + + + /** + * Метод логирования ошибки выполнения скриптов по расписанию + * + * @param \Throwable $th + * @return void + */ + private function logExecErr(\Throwable $th): void + { + $context = [ + //Скрипт откуда запустилась задача + 'command' => static::class, + //Скрипт, в котором произошла ошибка + 'file' => $th->getFile(), + 'line' => $th->getLine(), + ]; + \Log::channel('schedule_err')->error($th->getMessage(), $context); + } +}