Archived
1
0
Fork 0

also log debugging statements to file

This commit is contained in:
Lukas Winkler 2018-01-27 22:21:43 +01:00
parent d8a814dec2
commit 2e262c8315

View file

@ -15,6 +15,7 @@ import github_stars
logger = logging.getLogger()
logger.handlers = []
formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
logger.setLevel(logging.DEBUG)
with open("config.yaml", 'r') as stream:
try:
@ -105,6 +106,7 @@ async def handle_feed(session, wall, sitetitle, site):
else:
logger.debug("no latest_article: " + sitetitle)
if f.entries:
logger.debug("first fetch, so just checking for the latest article:" + sitetitle)
sites[sitetitle]["latest_article"] = f.entries[0].title