调整日志

This commit is contained in:
liuwei
2025-03-19 14:29:37 +08:00
parent 0ed506a6a4
commit 48710748fd

View File

@@ -77,15 +77,15 @@ class PluginInterface(ABC):
if os.path.exists(config_path):
with open(config_path, "r", encoding="utf-8") as f:
plugin_config = toml.load(f)
print(f"{config_path} 加载插件{self.name}配置:{plugin_config}")
self.LOG.info(f"{config_path} 加载插件{self.name}配置:{plugin_config}")
self._config.update(plugin_config)
print(f"{config_path} 加载插件配置成功")
self.LOG.info(f"{config_path} 加载插件配置成功")
return True
else:
print(f"插件配置文件 {config_path} 不存在,使用默认配置")
self.LOG.info(f"插件配置文件 {config_path} 不存在,使用默认配置")
return True # 配置文件不存在也视为成功,使用默认配置
except Exception as e:
print(f"加载插件配置失败: {e}")
self.LOG.info(f"加载插件配置失败: {e}")
return False
def set_plugin_path(self, path: str) -> None: