diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-06-20 20:17:27 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-06-20 20:23:52 +0200 |
commit | 9ab7ff204430b125db3b6ca368af104d20e793ed (patch) | |
tree | a75082d2d2104aefa6620c2ff95d40ee96767e8a /internal/feed/cache_v1.go | |
parent | c2a14778510e7166eaeb7b8cb61eac798b96b467 (diff) | |
download | feed2imap-go-9ab7ff204430b125db3b6ca368af104d20e793ed.tar.gz feed2imap-go-9ab7ff204430b125db3b6ca368af104d20e793ed.tar.bz2 feed2imap-go-9ab7ff204430b125db3b6ca368af104d20e793ed.zip |
Fix/add debug messages
Diffstat (limited to '')
-rw-r--r-- | internal/feed/cache_v1.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/feed/cache_v1.go b/internal/feed/cache_v1.go index 157741f..02890e1 100644 --- a/internal/feed/cache_v1.go +++ b/internal/feed/cache_v1.go @@ -2,6 +2,7 @@ package feed import ( "crypto/sha256" + "encoding/base64" "encoding/hex" "fmt" "strconv" @@ -207,6 +208,7 @@ func (cf *cachedFeed) filterItems(items []item, ignoreHash, alwaysNew bool) []it prevId := cf.Items[*oldIdx].ID ci.ID = prevId item.itemId = prevId + log.Debugf("oldIdx: %d, prevId: %s, item.id: %s", *oldIdx, prevId, item.id()) cf.deleteItem(*oldIdx) } filtered = append(filtered, *item) @@ -225,7 +227,7 @@ CACHE_ITEMS: item.addReason("guid (upd)") app(item, ci, &idx) } else { - log.Debugf("Similar, ignoring") + log.Debugf("Similar, ignoring item %s", base64.RawURLEncoding.EncodeToString(oldItem.ID[:])) } continue CACHE_ITEMS |