From 122888f39af6f98471600425cf66d2e1cc2aa5d2 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Mon, 18 Mar 2024 12:58:17 +0800 Subject: [PATCH] Vue Polling - update info log location when job is not found --- app/Classes/General/Abstracts/AbstractControllerLogic.php | 2 +- config/logging.php | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/Classes/General/Abstracts/AbstractControllerLogic.php b/app/Classes/General/Abstracts/AbstractControllerLogic.php index 61c70f44..f26e2ad0 100644 --- a/app/Classes/General/Abstracts/AbstractControllerLogic.php +++ b/app/Classes/General/Abstracts/AbstractControllerLogic.php @@ -69,7 +69,7 @@ abstract class AbstractControllerLogic } catch (ErrorException|GeneralExceptions $exception){ if ($exception instanceof JobResourceNotFoundException) { - Log::error(sprintf( + Log::channel('vue_polling')->info(sprintf( "Uncaught exception '%s' with message '%s' in %s:%d", get_class($exception), $exception->getMessage(), diff --git a/config/logging.php b/config/logging.php index d0d0a009..e480e00e 100644 --- a/config/logging.php +++ b/config/logging.php @@ -108,6 +108,13 @@ return [ 'driver' => 'errorlog', 'level' => 'debug', ], + + 'vue_polling' => [ + 'driver' => 'single', + 'path' => storage_path('logs/laravel_vue_plling.log'), + 'level' => 'info', + ], + ], ];