Skip to content

Commit e01e0ca

Browse files
committed
minor logging tweaks
for snarfed/bridgy-fed#1060
1 parent 5e27d89 commit e01e0ca

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lexrpc/client.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,13 @@ def loggable(val):
200200
output = resp.json()
201201

202202
if not resp.ok:
203-
logger.debug(f'Got: {resp.text}')
203+
logger.debug(f'Got {resp.status_code}: {resp.text}')
204204

205205
if nsid in (LOGIN_NSID, REFRESH_NSID): # auth
206206
if resp.ok:
207-
logger.info(f'Logged in as {output.get("did")}, storing session')
207+
logger.debug(f'Logged in as {output.get("did")}, storing session')
208208
else:
209-
logger.info(f'Login failed, nulling out session')
209+
logger.debug(f'Login failed, nulling out session')
210210
output = {}
211211

212212
self.session = output

lexrpc/flask_server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def dispatch_request(self, nsid):
107107
}, 501, RESPONSE_HEADERS
108108
except (ValidationError, ValueError) as e:
109109
if isinstance(e, ValueError):
110-
logging.info(f'Method raised', exc_info=True)
110+
logging.debug(f'Method raised', exc_info=True)
111111
return {
112112
'error': getattr(e, 'name', 'InvalidRequest'),
113113
'message': getattr(e, 'message', str(e)),

0 commit comments

Comments
 (0)