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