mirror of
https://github.com/Shu-Ying/main_plugin_farm.git
synced 2026-10-29 21:59:58 +08:00
fixed # 修复astrbot日志未使用logging.basicConfig
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
# 更新日志
|
||||
|
||||
## 待发布
|
||||
|
||||
- 全部插件及私有共享模块日志接入AstrBot官方logger,保留启动下载进度。
|
||||
- 不再配置独立日志文件或修改宿主日志处理器;移除包内开发命令行入口。
|
||||
- 新增发布包日志规范检查,拒绝内置logging及自建日志处理器。
|
||||
|
||||
## 2.0.2 — 待发布
|
||||
|
||||
### 新增
|
||||
|
||||
@@ -2,14 +2,13 @@
|
||||
|
||||
import asyncio
|
||||
from collections import OrderedDict
|
||||
import logging
|
||||
import re
|
||||
from time import monotonic
|
||||
|
||||
import aiohttp
|
||||
from astrbot.api import logger
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
MAX_BYTES = 2 * 1024 * 1024
|
||||
MAX_ENTRIES = 16
|
||||
FETCH_TIMEOUT = 2
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import asyncio
|
||||
import json
|
||||
import logging
|
||||
from pathlib import Path
|
||||
|
||||
from astrbot.api import AstrBotConfig
|
||||
from astrbot.api import logger
|
||||
from astrbot.api.event import AstrMessageEvent, filter
|
||||
from astrbot.api.message_components import At, Image
|
||||
from astrbot.api.star import Context, Star, StarTools
|
||||
@@ -16,9 +16,6 @@ from .runtime import Runtime, command_map
|
||||
COMMANDS = command_map('astrbot')
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class FarmPlugin(Star):
|
||||
def __init__(self, context: Context, config: AstrBotConfig):
|
||||
super().__init__(context)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
"""AstrBot拥有日志配置和输出,插件不创建或关闭任何日志处理器。"""
|
||||
|
||||
|
||||
def open_logs(data_dir):
|
||||
return None, None
|
||||
|
||||
|
||||
def close_logs(file_handler, console_handler):
|
||||
pass
|
||||
Reference in New Issue
Block a user