perf: 颜色日志-优化控制台显示

This commit is contained in:
Soulter
2023-05-14 20:51:39 +08:00
parent c5bdad02e5
commit 454a74f4e1
4 changed files with 37 additions and 27 deletions
+3 -1
View File
@@ -9,6 +9,8 @@ import json
import util.plugin_util as putil
import shutil
import importlib
from util import general_utils as gu
PLATFORM_QQCHAN = 'qqchan'
PLATFORM_GOCQ = 'gocq'
@@ -41,7 +43,7 @@ class Command:
if hit:
return True, res
except BaseException as e:
print(f"[Debug] {k}插件加载出现问题,原因: {str(e)}\n已安装插件: {cached_plugins.keys}\n如果你没有相关装插件的想法, 请直接忽略此报错, 不影响其他功能的运行。")
gu.log("{k}插件加载出现问题,原因: {str(e)}\n已安装插件: {cached_plugins.keys}\n如果你没有相关装插件的想法, 请直接忽略此报错, 不影响其他功能的运行。", level=gu.LEVEL_WARNING)
if self.command_start_with(message, "nick"):
return True, self.set_nick(message, platform)