鲁浩 vor 10 Monaten
Ursprung
Commit
114d61616f
2 geänderte Dateien mit 12 neuen und 2 gelöschten Zeilen
  1. 4 2
      server/flaskProject/app.py
  2. 8 0
      server/flaskProject/logs/2024-02-26.log

+ 4 - 2
server/flaskProject/app.py

@@ -63,7 +63,9 @@ day = current_date.day
 
 # 将年月日格式化为字符串
 formatted_date = current_date.strftime("%Y-%m-%d")
-logger = CustomLogger(f'{os.path.dirname(__file__)}/logs/{formatted_date}.log')
+# logger = CustomLogger(f'{os.path.dirname(__file__)}/logs/{formatted_date}.log')
+# logger = CustomLogger(f'/Users/jasonphd/Desktop/gogs/JasonPhdWork/server/flaskProject/logs{formatted_date}.log')
+logger = CustomLogger(f'/Users/jasonphd/Desktop/gogs/JasonPhdWork/app/logs{formatted_date}.log')
 
 
 # 自定义中间件
@@ -73,4 +75,4 @@ def log_request_info():
 
 
 if __name__ == '__main__':
-    app.run(port=5005)
+    app.run(host='0.0.0.0',port=5005)

+ 8 - 0
server/flaskProject/logs/2024-02-26.log

@@ -59,3 +59,11 @@
 2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708916241', 'type': 1} method:POST ip:127.0.0.1
 2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708916244', 'type': 1} method:POST ip:127.0.0.1
 2024-02-26 INFO: url:http://127.0.0.1:5000/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2YxMGViOWQtZWIwZC00ZWE2LWI2MTUtYmExOGEyNmUxNDUzIiwiZXhwIjoxNzA5NTIzMDU4fQ.NCuC2uttC1Oqo6Kh5XiNvvtcD-fknPW8JVH7W1xjdoo', 'uid': '7f10eb9d-eb0d-4ea6-b615-ba18a26e1453', 'start': '1707926400', 'end': '1708916244', 'type': 1} method:POST ip:127.0.0.1
+2024-02-26 INFO: url:http://127.0.0.1:5005/user/register params:{'login_type': '1', 'account': 'nike', 'password': 'wyt615115@'} method:POST ip:127.0.0.1
+2024-02-26 INFO: url:http://127.0.0.1:5005/user/login params:{'login_type': '1', 'account': 'nike', 'password': 'wyt615115@'} method:POST ip:127.0.0.1
+2024-02-26 INFO: url:http://127.0.0.1:5005/user/t params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiM2ZkMDE4MjAtY2FjZi00MDA4LWI0ZjAtNTU4MmJhNjIzZTQ0IiwiZXhwIjoxNzA5NTU0MjIxfQ.I-V6RI2vwOVXpfyqiYEsZuL8eFHbA3GlHwQAT73QS7c', 'uid': '3fd01820-cacf-4008-b4f0-5582ba623e44'} method:POST ip:127.0.0.1
+2024-02-26 INFO: url:http://127.0.0.1:5005/money/insert params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiM2ZkMDE4MjAtY2FjZi00MDA4LWI0ZjAtNTU4MmJhNjIzZTQ0IiwiZXhwIjoxNzA5NTU0MjIxfQ.I-V6RI2vwOVXpfyqiYEsZuL8eFHbA3GlHwQAT73QS7c', 'uid': '3fd01820-cacf-4008-b4f0-5582ba623e44', 'kind': 3, 'mount': 2222.0, 'des': 'swimming', 'paytime': '1708916244', 'cash_type': 'CNY', 'location': '农场'} method:POST ip:127.0.0.1
+2024-02-26 INFO: url:http://127.0.0.1:5005/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiM2ZkMDE4MjAtY2FjZi00MDA4LWI0ZjAtNTU4MmJhNjIzZTQ0IiwiZXhwIjoxNzA5NTU0MjIxfQ.I-V6RI2vwOVXpfyqiYEsZuL8eFHbA3GlHwQAT73QS7c', 'uid': '3fd01820-cacf-4008-b4f0-5582ba623e44', 'start': '1707926400', 'end': '1708916244', 'type': 1} method:POST ip:127.0.0.1
+2024-02-26 INFO: url:http://127.0.0.1:5005/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiM2ZkMDE4MjAtY2FjZi00MDA4LWI0ZjAtNTU4MmJhNjIzZTQ0IiwiZXhwIjoxNzA5NTU0MjIxfQ.I-V6RI2vwOVXpfyqiYEsZuL8eFHbA3GlHwQAT73QS7c', 'uid': '3fd01820-cacf-4008-b4f0-5582ba623e44', 'start': '1707926400', 'end': '0', 'type': 1} method:POST ip:127.0.0.1
+2024-02-26 INFO: url:http://127.0.0.1:5005/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiM2ZkMDE4MjAtY2FjZi00MDA4LWI0ZjAtNTU4MmJhNjIzZTQ0IiwiZXhwIjoxNzA5NTU0MjIxfQ.I-V6RI2vwOVXpfyqiYEsZuL8eFHbA3GlHwQAT73QS7c', 'uid': '3fd01820-cacf-4008-b4f0-5582ba623e44', 'start': '1707926400', 'end': '1708936244', 'type': 1} method:POST ip:127.0.0.1
+2024-02-26 INFO: url:http://127.0.0.1:5005/money/check params:{'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiM2ZkMDE4MjAtY2FjZi00MDA4LWI0ZjAtNTU4MmJhNjIzZTQ0IiwiZXhwIjoxNzA5NTU0MjIxfQ.I-V6RI2vwOVXpfyqiYEsZuL8eFHbA3GlHwQAT73QS7c', 'uid': '3fd01820-cacf-4008-b4f0-5582ba623e44', 'start': '1707926400', 'end': '1708936244', 'type': 3} method:POST ip:127.0.0.1