From 9cfc1067fdd607de73327d65d44a6bbae90e9469 Mon Sep 17 00:00:00 2001 From: schneefux Date: Wed, 8 Mar 2017 20:07:05 +0100 Subject: log: be more verbose --- api.py | 4 ++++ crawler.py | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api.py b/api.py index cfbcbb8..f436b57 100644 --- a/api.py +++ b/api.py @@ -48,6 +48,8 @@ class Apigrabber(joblib.worker.Worker): playername = "" async with self._pool.acquire() as con: + logging.debug("%s: running on %s with parameters '%s'", + jobid, payload["region"], payload["params"]) try: async for data in api.matches(region=payload["region"], params=payload["params"]): @@ -64,6 +66,8 @@ class Apigrabber(joblib.worker.Worker): payload=payloads, priority=priority) except crawler.ApiError as error: + logging.warning("%s: API returned error '%s'", + jobid, error.args[0]) raise joblib.worker.JobFailed(error.args[0]) diff --git a/crawler.py b/crawler.py index 20428b6..2aa6a7e 100644 --- a/crawler.py +++ b/crawler.py @@ -72,8 +72,6 @@ class Crawler(object): params) if "errors" in res: - logging.warn("API returned error: '%s'", - res["errors"]) if res["errors"][0].get("title") == "Not Found" \ and params["page[offset]"] > 0: # a query returned exactly 50 matches -- cgit v1.3.1