1
0
Fork 0
mirror of synced 2024-06-22 16:20:23 +12:00

Changed up the logging to make sure errors are recorded, along with information needed

This commit is contained in:
Phxntxm 2016-11-12 22:06:02 -06:00
parent 6e5a1f6d45
commit 44d4f66ef5
3 changed files with 4 additions and 4 deletions

View file

@ -77,7 +77,7 @@ class Deviantart:
params['username'] = da_name
async with self.session.get(self.base_url, headers=self.headers, params=params) as response:
data = await response.json()
log.info("DA responded with {}".format(data))
log.warning("DA responded with {}".format(data))
result = data['results'][0]
cache[da_name] = result
@ -100,7 +100,7 @@ class Deviantart:
update = {'last_updated': {da_name: result['deviationid']}}
await config.update_content('deviantart', update, r_filter)
except Exception as e:
tb = traceback.format_tb(e)
tb = traceback.format_exc()
fmt = "{}\n{0.__class__.__name__}: {0}".format(tb, e)
log.error(fmt)

View file

@ -106,7 +106,7 @@ class Picarto:
await config.update_content('picarto', {'live': 0}, {'member_id': m_id})
await asyncio.sleep(30)
except Exception as e:
tb = traceback.format_tb(e)
tb = traceback.format_exc()
fmt = "{}\n{0.__class__.__name__}: {0}".format(tb, e)
log.error(fmt)

View file

@ -99,7 +99,7 @@ class Twitch:
await config.update_content('twitch', {'live': 0}, {'member_id': m_id})
await asyncio.sleep(30)
except Exception as e:
tb = traceback.format_tb(e)
tb = traceback.format_exc()
fmt = "{}\n{0.__class__.__name__}: {0}".format(tb, e)
log.error(fmt)