summaryrefslogtreecommitdiff
path: root/jfr_playoff/remote.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-02-24 00:54:16 +0100
committeremkael <emkael@tlen.pl>2018-02-24 00:54:16 +0100
commit6971fa553b1232b8faa61cb9545ac0ead78782f6 (patch)
treeb97ff0eaa680af9b2c14eabf37db3824f7c31742 /jfr_playoff/remote.py
parentb6685df922615ebb1b36fe7a9b0e8af3261ff1dc (diff)
Lots of lots of messages are being logged
Diffstat (limited to 'jfr_playoff/remote.py')
-rw-r--r--jfr_playoff/remote.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/jfr_playoff/remote.py b/jfr_playoff/remote.py
index f02a8d4..a113c96 100644
--- a/jfr_playoff/remote.py
+++ b/jfr_playoff/remote.py
@@ -1,6 +1,7 @@
import requests
from bs4 import BeautifulSoup as bs
+from jfr_playoff.logger import PlayoffLogger
class RemoteUrl:
@@ -8,6 +9,11 @@ class RemoteUrl:
@classmethod
def fetch(cls, url):
+ PlayoffLogger.get('remote').info(
+ 'fetching content for: %s', url)
if url not in cls.url_cache:
cls.url_cache[url] = requests.get(url).text
+ PlayoffLogger.get('remote').info(
+ 'content for %s not in cache: retrieved %d bytes',
+ url, len(cls.url_cache[url]))
return bs(cls.url_cache[url], 'lxml')