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
+12
View File
@@ -0,0 +1,12 @@
import os
file_path = r"c:\Users\NASPC\Documents\botAffilate\serverPython\automation.py"
with open(file_path, "r", encoding="utf-8") as f:
content = f.read()
content = "import logging\n" + content.replace("print(", "logging.info(")
with open(file_path, "w", encoding="utf-8") as f:
f.write(content)
print("Đã thay thế print thành logging.info trong automation.py")