feat: 增加退出cursor

This commit is contained in:
chengchongzhen
2025-01-09 18:53:34 +08:00
parent 3b0e7a2f0e
commit 2bc566aa26
3 changed files with 82 additions and 1 deletions

View File

@@ -11,8 +11,17 @@ logging.basicConfig(
filename=os.path.join(log_dir, f"{datetime.now().strftime('%Y-%m-%d')}.log"),
level=logging.DEBUG,
format="%(asctime)s - %(levelname)s - %(message)s",
encoding='utf-8',
)
# 创建控制台处理器
console_handler = logging.StreamHandler()
console_handler.setLevel(logging.INFO)
console_handler.setFormatter(logging.Formatter("%(message)s"))
# 将控制台处理器添加到日志记录器
logging.getLogger().addHandler(console_handler)
def main_task():
"""
Main task execution function. Simulates a workflow and handles errors.