feat: implement FastAPI service with structured logging and automated script modification utility
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user