]> git.mxchange.org Git - friendica.git/commitdiff
Improved logging with receiving mails
authorMichael Vogel <icarus@dabo.de>
Fri, 13 Feb 2015 07:09:27 +0000 (08:09 +0100)
committerMichael Vogel <icarus@dabo.de>
Fri, 13 Feb 2015 07:09:27 +0000 (08:09 +0100)
include/items.php
include/onepoll.php

index fb357d4db7b41c12e3d9d4c57888db28b780ea21..d6ca2008544bcb1f4eabacf4689f304363ece821 100644 (file)
@@ -1400,7 +1400,7 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                return 0;
        }
        if(count($r) > 1) {
-               logger('item_store: duplicated post occurred. Removing duplicates.');
+               logger('item_store: duplicated post occurred. Removing duplicates. uri = '.$arr['uri'].' uid = '.$arr['uid']);
                q("DELETE FROM `item` WHERE `uri` = '%s' AND `uid` = %d AND `id` != %d ",
                        dbesc($arr['uri']),
                        intval($arr['uid']),
index ba31c4d4024faee77f3d84731854d54c56eb4440..7b93a9a2f0d0a63e7ee422f0919b2b08c28597cf 100644 (file)
@@ -284,13 +284,13 @@ function onepoll_run(&$argv, &$argc){
        }
        elseif($contact['network'] === NETWORK_MAIL || $contact['network'] === NETWORK_MAIL2) {
 
-               logger("onepoll: mail: Fetching", LOGGER_DEBUG);
+               logger("Mail: Fetching", LOGGER_DEBUG);
 
                $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
                if($mail_disabled)
                        return;
 
-               logger("onepoll: Mail: Enabled", LOGGER_DEBUG);
+               logger("Mail: Enabled", LOGGER_DEBUG);
 
                $mbox = null;
                $x = q("SELECT `prvkey` FROM `user` WHERE `uid` = %d LIMIT 1",
@@ -312,7 +312,9 @@ function onepoll_run(&$argv, &$argc){
                                        intval($mailconf[0]['id']),
                                        intval($importer_uid)
                                );
-                       }
+                               logger("Mail: Connected to " . $mailconf[0]['user']);
+                       } else
+                               logger("Mail: Connection error ".$mailconf[0]['user']." ".print_r(imap_errors()));
                }
                if($mbox) {
 
@@ -523,7 +525,10 @@ function onepoll_run(&$argv, &$argc){
                                                }
                                        }
                                }
-                       }
+                       } else
+                               logger("Mail: no mails for ".$mailconf[0]['user']);
+
+                       logger("Mail: closing connection for ".$mailconf[0]['user']);
                        imap_close($mbox);
                }
        }