]> 91.132.146.200 Git - insipid.git/commitdiff
updated to use global log method
authorBanana <mail@bananas-playground.net>
Mon, 11 Sep 2023 09:49:05 +0000 (11:49 +0200)
committerBanana <mail@bananas-playground.net>
Mon, 11 Sep 2023 09:49:05 +0000 (11:49 +0200)
webroot/lib/simple-imap.class.php
webroot/lib/snapshot.class.php

index 34d793cf0f12e6447c45b71b476913cd3cd3d965..bc570c4fba0894a121a67045e131ca5ded5194c5 100644 (file)
@@ -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, "*");
index 535c012075e545136fe57e8e047ee050349d9d9a..cc920d2ca9b4c00fa9c7853c5675ca860c786506 100644 (file)
@@ -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");
                        }
                }