From: Banana Date: Mon, 11 Sep 2023 09:49:05 +0000 (+0200) Subject: updated to use global log method X-Git-Tag: 2.8.2_20230914~11 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=c3a7a0658ed41043b21b654c37c837dca42f277e;p=insipid.git updated to use global log method --- diff --git a/webroot/lib/simple-imap.class.php b/webroot/lib/simple-imap.class.php index 34d793c..bc570c4 100644 --- a/webroot/lib/simple-imap.class.php +++ b/webroot/lib/simple-imap.class.php @@ -3,7 +3,7 @@ * Insipid * Personal web-bookmark-system * - * Copyright 2016-2022 Johannes Keßler + * Copyright 2016-2023 Johannes Keßler * * Development starting from 2011: Johannes Keßler * https://www.bananas-playground.net/projekt/insipid/ @@ -144,11 +144,11 @@ class SimpleImap { $status = imap_status($this->_connection, $this->_connectionstring.$this->_mailbox, SA_ALL); if(DEBUG === true) { - var_dump("messages " . $status->messages); - var_dump("recent " . $status->recent); - var_dump("unseen " . $status->unseen); - var_dump("uidnext " . $status->uidnext); - var_dump("uidvalidity " . $status->uidvalidity); + Summoner::sysLog("messages " . $status->messages); + Summoner::sysLog("recent " . $status->recent); + Summoner::sysLog("unseen " . $status->unseen); + Summoner::sysLog("uidnext " . $status->uidnext); + Summoner::sysLog("uidvalidity " . $status->uidvalidity); } $list = imap_getmailboxes($this->_connection, $this->_connectionstring, "*"); diff --git a/webroot/lib/snapshot.class.php b/webroot/lib/snapshot.class.php index 535c012..cc920d2 100644 --- a/webroot/lib/snapshot.class.php +++ b/webroot/lib/snapshot.class.php @@ -3,7 +3,7 @@ * Insipid * Personal web-bookmark-system * - * Copyright 2016-2022 Johannes Keßler + * Copyright 2016-2023 Johannes Keßler * * Development starting from 2011: Johannes Keßler * https://www.bananas-playground.net/projekt/insipid/ @@ -60,13 +60,13 @@ class Snapshot { if(!empty($url) && is_writable(dirname($filename))) { if(DEBUG) { - error_log("DEBUG try to save to $filename with $this->_googlePageSpeed for $url"); + Summoner::sysLog("[DEBUG] try to save to $filename with $this->_googlePageSpeed for $url"); } $theCall = Summoner::curlCall($this->_googlePageSpeed.urlencode($url).'&screenshot=true'); if(!empty($theCall)) { $jsonData = json_decode($theCall,true); if(DEBUG) { - error_log("DEBUG Call result data: ".var_export($jsonData, true)); + Summoner::sysLog("[DEBUG] Call result data: ".var_export($jsonData, true)); } if(!empty($jsonData) && isset($jsonData['lighthouseResult']['audits']['full-page-screenshot']['details']['screenshot']['data'])) { $imageData = $jsonData['lighthouseResult']['audits']['full-page-screenshot']['details']['screenshot']['data']; @@ -79,10 +79,10 @@ class Snapshot { fclose($source); fclose($destination); } elseif(DEBUG) { - error_log("DEBUG invalid json data. Path ['lighthouseResult']['audits']['full-page-screenshot']['details']['screenshot']['data'] not found in : ".var_export($jsonData, true)); + Summoner::sysLog("[DEBUG] invalid json data. Path ['lighthouseResult']['audits']['full-page-screenshot']['details']['screenshot']['data'] not found in : ".var_export($jsonData, true)); } } elseif(DEBUG) { - error_log("DEBUG curl call failed"); + Summoner::sysLog("[DEBUG] curl call failed"); } }