aboutsummaryrefslogtreecommitdiff
path: root/src/crawler
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-11-03 08:19:18 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-11-03 08:19:18 +0100
commit3b8f478e7d54ea0816f438d3a0c4e59f534be26c (patch)
tree1e29b94fa4f5b681a1f6780818e585983177211b /src/crawler
parentStarting to improve the loging for Heroku (with logging.StreamHandler). (diff)
downloadnewspipe-3b8f478e7d54ea0816f438d3a0c4e59f534be26c.tar.gz
newspipe-3b8f478e7d54ea0816f438d3a0c4e59f534be26c.tar.bz2
newspipe-3b8f478e7d54ea0816f438d3a0c4e59f534be26c.zip
Fixed an error in the logging after the insertion of an article
Diffstat (limited to 'src/crawler')
-rw-r--r--src/crawler/classic_crawler.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/crawler/classic_crawler.py b/src/crawler/classic_crawler.py
index 610f3544..4f21a29f 100644
--- a/src/crawler/classic_crawler.py
+++ b/src/crawler/classic_crawler.py
@@ -163,10 +163,9 @@ async def insert_database(user, feed):
article = construct_article(article, feed)
try:
new_articles.append(art_contr.create(**article))
- logger.info("New article % (%r) added.",
- article['title'], article['link'])
+ logger.info('New article added: {}'.format(article['link']))
except Exception:
- logger.exception("Error when inserting article in database:")
+ logger.exception('Error when inserting article in database:')
continue
return new_articles
bgstack15