I am trying to log all of the errors from PHP to an external log file.
Is it possible to get the error messages displayed from
error_reporting(E_ALL);
ini_set('display_errors', 1);
as variables.
I do not want to throw any exceptions on the page I want to send them as variables.
The reason for this is I'm setting up notifications for when an error happens in AWS cloud watch as per https://aws.amazon.com/blogs/developer/php-application-logging-with-amazon-cloudwatch-logs-and-monolog/.
I can of course just change where its logging to, but I want to be notified if there is an error so I can then go check the actual log file.