Log exceptions to Psr\Log
composer require vperyod/errorlog-handler
See Psr\Log documentation.
// Create handler with a Logger instance
$handler = new Vperyod\ErrorlogHandler\ErrorlogHandler($logger);
// Optionally set the level to log (default:alert)
$handler->setLogLevel(LogLevel::ERROR);
// Optionally disable rethrowing if there are no other handlers for errors
$handler->setReThrow(false);
// Add to your middleware stack, radar, relay, etc.
$stack->middleware($handler);