add log class
[phinde.git] / src / phinde / Fetcher.php
index 5ea0cf24fd7b0f2d27389815756aad91bdce9372..dccb118c0ac52f0bd47fd73029b65cb7b5780a69 100644 (file)
@@ -43,7 +43,7 @@ class Fetcher
         $res = $req->send();
         if ($res->getStatus() === 304) {
             //not modified since last time, so don't crawl again
-            echo "Not modified since last fetch\n";
+            Log::info("Not modified since last fetch");
             return false;
         } else if ($res->getStatus() !== 200) {
             throw new \Exception(
@@ -79,7 +79,7 @@ class Fetcher
 
     public function storeDoc($url, $esDoc)
     {
-        echo "Store $url\n";
+        Log::info("Store $url");
         $esDoc->status->processed = gmdate('c');
         $r = new Elasticsearch_Request(
             $GLOBALS['phinde']['elasticsearch'] . 'document/'