summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBenjamin Brahmer <info@b-brahmer.de>2023-10-11 16:37:35 +0200
committerBenjamin Brahmer <info@b-brahmer.de>2023-10-11 18:40:38 +0200
commit816239c1988415c817893a939f3a66c598612552 (patch)
treec097a9f13fee93135539208563e405e5b9fe7010 /lib
parentbe0929092b155b84917ff4dc04ed690b60e6942b (diff)
Log more useful things when checking a logo
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Fetcher/FeedFetcher.php19
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;
}