Audio cleanup (#5618)

* add different logging level callbacks for task exception logging

* Add callback to tasks which didn't have them

* The boring stuff - (apply .trace() and .verbose() to audio, stop using debug_exc_log, delete audio_logging.py)

* Unsured import cleanup

* use new lavalink method

* return so it doesn't log this twice.

* improve logging on main event handler
This commit is contained in:
Draper
2022-03-16 16:42:17 +00:00
committed by GitHub
parent 593eeb5362
commit 2d9548ec0e
24 changed files with 301 additions and 241 deletions

View File

@@ -102,7 +102,7 @@ class SpotifyWrapper:
async with self.session.request("GET", url, params=params, headers=headers) as r:
data = await r.json(loads=json.loads)
if r.status != 200:
log.debug("Issue making GET request to %r: [%d] %r", url, r.status, data)
log.verbose("Issue making GET request to %r: [%d] %r", url, r.status, data)
return data
async def update_token(self, new_token: Mapping[str, str]):
@@ -156,7 +156,7 @@ class SpotifyWrapper:
async with self.session.post(url, data=payload, headers=headers) as r:
data = await r.json(loads=json.loads)
if r.status != 200:
log.debug("Issue making POST request to %r: [%d] %r", url, r.status, data)
log.verbose("Issue making POST request to %r: [%d] %r", url, r.status, data)
return data
async def make_get_call(self, url: str, params: MutableMapping) -> MutableMapping: