feat: implement FastAPI service with structured logging and automated script modification utility

This commit is contained in:
Victor Phan
2026-07-21 10:16:15 +07:00
parent adbfb43a48
commit 0c587685a5
3 changed files with 34 additions and 10 deletions
+11
View File
@@ -4,6 +4,17 @@ from automation import ShopeeBot
from typing import Optional
import logging
import os
import sys
# Cấu hình logging: ghi log ra cả màn hình (console) và file (shopee_bot.log)
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s',
handlers=[
logging.FileHandler("shopee_bot.log", encoding="utf-8"),
logging.StreamHandler(sys.stdout)
]
)
app = FastAPI(title="n8n Shopee Bridge API")