调整日志
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user