From c5d25294841d388b8ccc1f89d4adb6735ddaa182 Mon Sep 17 00:00:00 2001 From: Matthias Bilger Date: Sun, 2 Sep 2018 10:18:02 +0200 Subject: [PATCH] update logging --- login.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/login.py b/login.py index a4372b4..4a63401 100644 --- a/login.py +++ b/login.py @@ -16,6 +16,8 @@ pushover.init('***REMOVED***') logging.basicConfig( level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)8s - %(message)s', + filename='log.txt', + filemode='a+' ) logger = logging.getLogger('Infomentor Notifier') @@ -245,6 +247,7 @@ class Infomentor(object): os.makedirs('images', exist_ok=True) filename = 'images/{}.image'.format(id) if os.path.isfile(filename): + self.logger.info('image %s already downloaded', filename) return True url = self._mim_url('News/NewsImage/GetImage?id={}'.format(id)) r = self._do_get(url)