实现完整功能

This commit is contained in:
2025-07-07 08:23:02 +08:00
parent 35d50305c8
commit d1c129c691
20 changed files with 504 additions and 469 deletions
-15
View File
@@ -5,21 +5,6 @@ import os
import logging
from datetime import datetime
current_file = os.path.splitext(os.path.basename(__file__))[0]
now_str = datetime.now().strftime("%Y%m%d%H%M%S")
log_filename = f"{current_file}_{now_str}.log"
logging.basicConfig(
level=logging.DEBUG,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
handlers=[
logging.FileHandler(os.path.join("logs", log_filename), encoding="utf-8"),
logging.StreamHandler()
],
)
logger = logging.getLogger(current_file)
class Config:
def __init__(self, path="config.yaml"):
with open(path, "r", encoding="utf-8") as f: