mirror of
https://github.com/Yanyutin753/RefreshToV1Api.git
synced 2025-10-16 08:10:21 +00:00
[feat] 优化日志输出方式
This commit is contained in:
4
start.sh
4
start.sh
@@ -3,8 +3,8 @@
|
||||
# 记录当前日期和时间
|
||||
NOW=$(date +"%Y-%m-%d-%H-%M")
|
||||
|
||||
# 启动Gunicorn
|
||||
exec gunicorn -w 2 --threads 2 --bind 0.0.0.0:33333 main:app --access-logfile "./log/access-${NOW}.log" --error-logfile "./log/error-${NOW}.log"
|
||||
# 启动 Gunicorn 并使用 tee 命令同时输出日志到文件和控制台
|
||||
exec gunicorn -w 2 --threads 2 --bind 0.0.0.0:33333 main:app --access-logfile - --error-logfile - | tee "./log/access-${NOW}.log"
|
||||
|
||||
# python3 ./main.py
|
||||
|
||||
|
Reference in New Issue
Block a user