feat: 增强插件加载过程,记录 on_load 失败的插件并跳过注册

This commit is contained in:
DrSmoothl
2026-03-13 00:23:27 +08:00
parent e445c483b0
commit 98d7bed064
2 changed files with 8 additions and 3 deletions

View File

@@ -59,7 +59,8 @@ class RunnerIPCLogHandler(logging.Handler):
FLUSH_BATCH_SIZE: int = 20
#: 仅转发 logger name 以这些前缀开头的日志,第三方库日志将被忽略
ALLOWED_LOGGER_PREFIXES: tuple[str, ...] = ("plugin.", "plugin_runtime.")
#: 包含 "_maibot_plugin_" 前缀以覆盖插件模块中 logging.getLogger(__name__) 的场景
ALLOWED_LOGGER_PREFIXES: tuple[str, ...] = ("plugin.", "plugin_runtime.", "_maibot_plugin_")
def __init__(self) -> None:
super().__init__()