diff options
author | Benjamin Brahmer <info@b-brahmer.de> | 2023-10-11 16:37:35 +0200 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2023-10-11 18:40:38 +0200 |
commit | 816239c1988415c817893a939f3a66c598612552 (patch) | |
tree | c097a9f13fee93135539208563e405e5b9fe7010 | |
parent | be0929092b155b84917ff4dc04ed690b60e6942b (diff) |
Log more useful things when checking a logo
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
-rwxr-xr-x | lib/Fetcher/FeedFetcher.php | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/Fetcher/FeedFetcher.php b/lib/Fetcher/FeedFetcher.php index 001a50bb4..b079f63a9 100755 --- a/lib/Fetcher/FeedFetcher.php +++ b/lib/Fetcher/FeedFetcher.php @@ -427,10 +427,10 @@ class FeedFetcher implements IFeedFetcher $downloaded = true; $this->logger->debug( - "Feed:{url} Logo:{logo} Status:{status}", + "Feed:{feed} Logo:{logo} Status:{status}", [ 'status' => $response->getStatusCode(), - 'url' => $favicon_path, + 'feed' => $url, 'logo' => $favicon ] ); @@ -448,6 +448,14 @@ class FeedFetcher implements IFeedFetcher // check if file is actually an image if (!$is_image) { + $this->logger->debug( + "Downloaded file:{file} from {url} is not an image", + [ + 'file' => $favicon_path, + 'url' => $favicon + ] + ); + $return = $this->faviconFactory->get($base_url); return is_string($return) ? $return : null; } @@ -455,6 +463,13 @@ class FeedFetcher implements IFeedFetcher list($width, $height, $type, $attr) = getimagesize($favicon_path); // check if image is square else fall back to favicon if ($width !== $height) { + $this->logger->debug( + "Downloaded file:{file} from {url} is not square", + [ + 'file' => $favicon_path, + 'url' => $favicon + ] + ); $return = $this->faviconFactory->get($base_url); return is_string($return) ? $return : null; } |