From bf1dd72a392caaf7372341e1d0ec135dbff3288b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CVeLiTi=E2=80=9D?= <“info@veliti.nl”> Date: Wed, 27 Mar 2024 19:59:55 +0100 Subject: [PATCH] Enhanced logging --- assets/functions.php | 5 +++++ index.php | 6 ++++++ login.php | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/assets/functions.php b/assets/functions.php index b9c4bc3..37e792b 100644 --- a/assets/functions.php +++ b/assets/functions.php @@ -484,6 +484,11 @@ function ioServer($api_call, $data){ //Check If errorcode is returned if($http_status['http_code'] == '403' || $http_status['http_code'] == '400') {$resp = generate_payload('NOK');} + if (debug){ + $message = $date.';'.$api_call; + debuglog($message); + } + //Response return $resp; } diff --git a/index.php b/index.php index c784db1..c327186 100644 --- a/index.php +++ b/index.php @@ -73,3 +73,9 @@ $error = ''; // Include the requested page include $page . '.php'; +//debuglog +if (debug){ + $message = $date.';'.json_encode($_GET).';'.$_SESSION['username']; + debuglog($message); +} + diff --git a/login.php b/login.php index 01b221f..e24f0d0 100644 --- a/login.php +++ b/login.php @@ -305,7 +305,7 @@ echo' echo '
- +