How to make email notifications for errors and exceptions? |
How to make email notifications for errors and exceptions without changing the file /system/Debug/Exceptions.php?
I want to change error handling without changing engine code!
Isn't this possible in `App\Config\Exceptions` or are you looking for a different solution?
You can't now.
You need to replace Exceptions.
(01-30-2023, 06:36 PM)kenjis Wrote: You can't now.That is, without files in the system folder, is this impossible? (01-30-2023, 05:51 AM)superior Wrote: Isn't this possible in `App\Config\Exceptions` or are you looking for a different solution? Can you write a sample code how can i do it without editing folder @"system"? Please!
I monitor /writable/logs folder for files every 15 min. If there is error file - script send me motification via telegram or email.
I try it, but this is not work. What is wrong?
PHP Code: <?php
I think "class Exceptions extends Exceptions" does not work.
It seems fatal error. And the collectVars() method works only in development mode.
(01-31-2023, 05:14 PM)kenjis Wrote: See https://codeigniter4.github.io/CodeIgnit...asses.html (02-19-2023, 07:18 PM)kenjis Wrote: I think "class Exceptions extends Exceptions" does not work. yes I use now development mode. how to fix it to work?
Exceptions::exceptionHandler() is the exception handler.
Override the method. |
Welcome Guest, Not a member yet? Register Sign In |