From 46e7bf874b95d3f5a0378f0dac8b14fa2a579041 Mon Sep 17 00:00:00 2001 From: "Abdulmhsen B. A. A" Date: Fri, 22 Apr 2022 21:43:20 +0300 Subject: [PATCH] Make guid array visible in log file, regardless if the guids are empty or not. --- src/Libs/Servers/JellyfinServer.php | 6 +++++- src/Libs/Servers/PlexServer.php | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Libs/Servers/JellyfinServer.php b/src/Libs/Servers/JellyfinServer.php index 23c028ee..0f097453 100644 --- a/src/Libs/Servers/JellyfinServer.php +++ b/src/Libs/Servers/JellyfinServer.php @@ -1219,9 +1219,13 @@ class JellyfinServer implements ServerInterface } } + $guids = (array)($item->ProviderIds ?? []); + $this->logger->notice( sprintf('Ignoring %s. No valid GUIDs.', $iName), - (array)($item->ProviderIds ?? []) + [ + 'guids' => empty($guids) ? 'None' : $guids + ] ); Data::increment($this->name, $type . '_ignored_no_supported_guid'); diff --git a/src/Libs/Servers/PlexServer.php b/src/Libs/Servers/PlexServer.php index 3667d22e..6470c532 100644 --- a/src/Libs/Servers/PlexServer.php +++ b/src/Libs/Servers/PlexServer.php @@ -1247,7 +1247,12 @@ class PlexServer implements ServerInterface } } - $this->logger->notice(sprintf('Ignoring %s. No valid GUIDs.', $iName), $item->Guid ?? []); + $this->logger->notice( + sprintf('Ignoring %s. No valid GUIDs.', $iName), + [ + 'guids' => empty($item->Guid) ? 'None' : $item->Guid, + ] + ); Data::increment($this->name, $type . '_ignored_no_supported_guid'); return; }