internal 1.1.28a0__py3-none-any.whl → 1.1.29__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of internal might be problematic. Click here for more details.

@@ -28,12 +28,18 @@ class LogRequestMiddleware(BaseHTTPMiddleware):
28
28
  params = {k: v[0] if len(v) == 1 else v for k, v in temp.items()}
29
29
 
30
30
  body = await request.body()
31
- self.logger.info(f"[Request id: {request_id}] \nURL: {method} {url} \nParams: {params} \nBody: {body} \nHeaders: {headers} \nstart processing...")
31
+ if "multipart" in headers.get("content-type"):
32
+ self.logger.info(f"[Request id: {request_id}] \nURL: {method} {url} \nParams: {params} \nBody: 因上傳檔案不顯示body \nHeaders: {headers} \nstart processing...")
33
+ else:
34
+ self.logger.info(f"[Request id: {request_id}] \nURL: {method} {url} \nParams: {params} \nBody: {body} \nHeaders: {headers} \nstart processing...")
32
35
 
33
36
  # 记录请求处理时间
34
37
  start_time = time.time()
35
38
  response = await call_next(request)
36
39
  process_time = time.time() - start_time
37
40
 
38
- self.logger.info(f"[Request id: {request_id}] \nURL: {method} {url} \nParams: {params} \nBody: {body} \nCompleted in {process_time:.4f} seconds")
41
+ if "multipart" in headers.get("content-type"):
42
+ self.logger.info(f"[Request id: {request_id}] \nURL: {method} {url} \nParams: {params} \nBody: 因上傳檔案不顯示body \nCompleted in {process_time:.4f} seconds")
43
+ else:
44
+ self.logger.info(f"[Request id: {request_id}] \nURL: {method} {url} \nParams: {params} \nBody: {body} \nCompleted in {process_time:.4f} seconds")
39
45
  return response
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: internal
3
- Version: 1.1.28a0
3
+ Version: 1.1.29
4
4
  Summary:
5
5
  Author: Ray
6
6
  Author-email: ray@cruisys.com
@@ -28,12 +28,12 @@ internal/http/responses.py,sha256=zvU0iRQ9-qxeEZfKmuvTi8lv9DFcaNAsHlQKOTCpVzw,29
28
28
  internal/interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
29
  internal/interface/base_interface.py,sha256=3YaVjIgLi_pZpLk5SEIk8WVkuICM8qPavT8rB0MdB5U,1536
30
30
  internal/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
- internal/middleware/log_request.py,sha256=01UeoCsjv38U0kZQwRqEspSbEUJDCb-WUN1TPrSAz7Y,1491
31
+ internal/middleware/log_request.py,sha256=cLOEKmsE5KpXmJSqy5Jqiz61vCsJAK1PXxsIyIq36Nc,1998
32
32
  internal/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
33
  internal/model/base_model.py,sha256=hxleV8fYNvFgUoYmCv_inEP3kA4tD4HhCBCNFVK8SZg,5509
34
34
  internal/model/operate.py,sha256=QSM6yXYXpJMwrqkUGEWZLrEBaUgqHwVHY_Fi4S42hKc,3190
35
35
  internal/utils.py,sha256=wK1QumW1AaWE1ga2-WcDH2rtXRr2hSLwXzy-iI5dTzY,3962
36
36
  internal/validator_utils.py,sha256=CqjaVFoAu5MqvBG_AkTP-r7AliWawtUWB851USj4moI,1519
37
- internal-1.1.28a0.dist-info/METADATA,sha256=_2Q6RZ1VLYkeqPtQwoS9ulV8g29DaQxvsyGwtI0m3yA,941
38
- internal-1.1.28a0.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
39
- internal-1.1.28a0.dist-info/RECORD,,
37
+ internal-1.1.29.dist-info/METADATA,sha256=e6ZgNto__ChFA4VsOm5PrSWI9ZZtHcn3ByIglT5uOXI,939
38
+ internal-1.1.29.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
39
+ internal-1.1.29.dist-info/RECORD,,