yzl 2 år sedan
förälder
incheckning
a0eda6ea6a
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      apps/Weather/views.py

+ 2 - 2
apps/Weather/views.py

@@ -91,12 +91,12 @@ class GetWeather(APIView):
                         result = json.loads(temp)
                         return Response({"content": result, "msg": "success", "code": 200})
                     except Exception as e:
-                        logging.info(traceback.format_exc())
+                        logging.info(f"cityid: {cityid} province:{province} city:{city} district: {district}   {traceback.format_exc()}")
                         return Response({"msg": "请联系管理员", "code": "50001"})
                 else:
                     return Response({"content": "", "msg": "success", "code": 500})
         except Exception as e:
-            logging.info(traceback.format_exc())
+            logging.info(f"cityid: {cityid} province:{province} city:{city} district: {district}   {traceback.format_exc()}")
             return Response({"msg": "请联系管理员", "code": "50001"})