格式化日志输出
(message)
| 3 | from datetime import datetime |
| 4 | |
| 5 | def log(message): |
| 6 | """格式化日志输出""" |
| 7 | timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S") |
| 8 | print(f"[INFO] {timestamp} - {message}") |
| 9 | |
| 10 | def process_rule(file_path): |
| 11 | if not os.path.exists(file_path): |