feat: 增加退出cursor
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user