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")
