From 242fb9dda02033518ee8f6d428c860d424635dde Mon Sep 17 00:00:00 2001 From: James Collins Date: Thu, 27 Jul 2023 19:47:09 +1000 Subject: [PATCH] added email logging --- config/logging.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/logging.php b/config/logging.php index d000835..f3d2dfc 100644 --- a/config/logging.php +++ b/config/logging.php @@ -126,6 +126,16 @@ return [ 'emergency' => [ 'path' => storage_path('logs/laravel.log'), ], + + 'email' => [ + 'driver' => 'monolog', + 'handler' => Monolog\Handler\NativeMailerHandler::class, + 'with' => [ + 'to' => 'webmaster@stemmechanics.com.au', + 'subject' => 'Laravel Error', + ], + 'level' => 'info', // Set the log level you want to be emailed (e.g., 'error', 'warning', 'info', etc.). + ], ], ];