Improved logging

This commit is contained in:
2023-03-17 14:13:28 +01:00
parent 95351f247c
commit 717586a9f0
3 changed files with 39 additions and 1 deletions

View File

@@ -78,7 +78,7 @@ async def random_pic(token: Union[str, None] = None) -> Tuple[str, str]:
f'{configGet("address", "posting", "api")}/albums/{configGet("album", "posting", "api")}/photos?q=&page_size={configGet("page_size", "posting")}&caption=queue',
headers={"Authorization": f"Bearer {token}"},
)
print(await resp.json(), flush=True)
logWrite("Random pic response: " + str(await resp.json()), debug=True)
if resp.status != 200:
logWrite(
f'Could not get photos from album {configGet("album", "posting", "api")}: HTTP {resp.status}'