summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2018-03-10 19:07:42 +0000
committerAndres Rey <[email protected]>2018-03-10 19:07:42 +0000
commit8c69aad325a0a19184f03e2ac8796449c4936177 (patch)
treeaa4196ed40fa600e519ed6bd7e9193c4bdcc56a9
parent4318edfb099ea92a414aaf933f870763499f0b50 (diff)
Add log messages
-rw-r--r--src/Readability.php3
1 files changed, 3 insertions, 0 deletions
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;