diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2016-11-10 20:52:35 +0100 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2016-11-10 20:52:35 +0100 |
| commit | 696fcd7ce4d495e356667019493bf312e2a6e47b (patch) | |
| tree | 3e8d60dad08dbe31660f2532d8ce893d35d50130 /src/phinde/Crawler.php | |
| parent | 9ff01ebe8cde0a07ad2a480d1a45eb1a29cb113d (diff) | |
| download | phinde-696fcd7ce4d495e356667019493bf312e2a6e47b.tar.gz phinde-696fcd7ce4d495e356667019493bf312e2a6e47b.zip | |
add log class
Diffstat (limited to 'src/phinde/Crawler.php')
| -rw-r--r-- | src/phinde/Crawler.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/phinde/Crawler.php b/src/phinde/Crawler.php index 38e3c3f..1f63e60 100644 --- a/src/phinde/Crawler.php +++ b/src/phinde/Crawler.php @@ -40,7 +40,7 @@ class Crawler { $mimetype = explode(';', $res->getHeader('content-type'))[0]; if (!isset(static::$supportedTypes[$mimetype])) { - echo "MIME type not supported for indexing: $mimetype\n"; + Log::info("MIME type not supported for crawling: $mimetype"); return array(); } @@ -98,13 +98,15 @@ class Crawler protected function showLinks($linkInfos) { foreach ($linkInfos as $linkInfo) { - echo $linkInfo->url . "\n"; + Log::msg($linkInfo->url); if ($linkInfo->title) { - echo ' title: ' . $linkInfo->title . "\n"; - echo ' source: ' . $linkInfo->source . "\n"; - echo ' known: ' . intval($linkInfo->known) + Log::msg(' title: ' . $linkInfo->title); + Log::msg(' source: ' . $linkInfo->source); + Log::msg( + ' known: ' . intval($linkInfo->known) . ', crawl: ' . intval($linkInfo->crawl) - . ', index: ' . intval($linkInfo->index) . "\n"; + . ', index: ' . intval($linkInfo->index) + ); } } } |
