From 8c69aad325a0a19184f03e2ac8796449c4936177 Mon Sep 17 00:00:00 2001 From: Andres Rey Date: Sat, 10 Mar 2018 19:07:42 +0000 Subject: Add log messages --- src/Readability.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Readability.php b/src/Readability.php index 0431635..3998a88 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -189,6 +189,7 @@ class Readability $this->configuration->setCleanConditionally(false); $this->attempts[] = ['articleContent' => $result, 'textLength' => $length]; } else { + $this->logger->debug('[Parsing] Threshold not met, searching across attempts for some content.'); $this->attempts[] = ['articleContent' => $result, 'textLength' => $length]; // No luck after removing flags, just return the longest text we found during the different loops @@ -203,6 +204,8 @@ class Readability throw new ParseException('Could not parse text.'); } + $this->logger->debug('[Parsing] Threshold not met, but found some content in previous attempts.'); + $result = $this->attempts[0]['articleContent']; $parseSuccessful = true; break; -- cgit v1.2.3