From c1d71fba77f078cd7fd853bb78786fc4200dfba2 Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Mon, 15 Dec 2025 17:51:51 +0200 Subject: [PATCH] Adds logger helper to index --- public_html/index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public_html/index.php b/public_html/index.php index b328d21..3d7943b 100644 --- a/public_html/index.php +++ b/public_html/index.php @@ -176,6 +176,8 @@ use App\Core\LogThrottler; require_once __DIR__ . '/../app/core/NullLogger.php'; use App\Core\NullLogger; $logObject = new NullLogger(); + +require_once __DIR__ . '/../app/helpers/logger_loader.php'; // Get the user IP require_once __DIR__ . '/../app/helpers/ip_helper.php'; $user_IP = ''; @@ -220,7 +222,9 @@ try { } } catch (\Throwable $e) { // Do not break the app; log only - error_log('Migration check failed: ' . $e->getMessage()); + app_log('error', 'Migration check failed: ' . $e->getMessage(), [ + 'scope' => 'system', + ]); } // CSRF middleware and run pipeline