From 8be5f94b7c18b837db576729b81e061948cbd611 Mon Sep 17 00:00:00 2001 From: Juan Pablo Vial Date: Wed, 7 May 2025 20:01:55 -0400 Subject: [PATCH] Log solo los errores fatales. --- app/public/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/public/index.php b/app/public/index.php index a7faac5..cea8aff 100644 --- a/app/public/index.php +++ b/app/public/index.php @@ -16,7 +16,8 @@ try { register_shutdown_function(function() { $error = error_get_last(); - if ($error !== null) { + $fatal_errors = [E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR]; + if ($error !== null and in_array($error['type'], $fatal_errors, true)) { error_log(json_encode($error).PHP_EOL,3, '/logs/fatal.log'); } });