1. 默认打印是一行的
debug_logger.info(f'[rsp json] {rsp.json()}')
2022-01-10 20:38:53,108 | root | INFO | [rsp json] {'code': 200, 'msg': 'SUCCESS', 'data': {'id': 1, 'username'
2. 保留格式输出
debug_logger.info(f'[rsp json] {json.dumps(rsp.json(), sort_keys=True, indent=2) }')
2022-01-10 20:38:53,123 | root | INFO | [rsp json] { "code": 200, "data": [], "msg": "SUCCESS" }