fix: require()插件错误

This commit is contained in:
远野千束 2024-03-25 00:33:23 +08:00
parent 91b14d568c
commit 172f45208f
2 changed files with 3 additions and 2 deletions

View File

@ -217,6 +217,7 @@ class Database(BaseORMAdapter):
"""扁平化数据,返回扁平化对象
Args:
data: 数据可迭代对象
Returns: json字符串

View File

@ -2,7 +2,7 @@ import sys
import loguru
from typing import TYPE_CHECKING
from .config import load_from_yaml
from .language import Language, get_default_lang
from .language import Language, get_default_lang, get_system_lang_code
logger = loguru.logger
if TYPE_CHECKING:
@ -59,7 +59,7 @@ def init_log():
format=get_format(config.get("log_level", "INFO")),
)
show_icon = config.get("log_icon", True)
lang = Language(config.get("default_language", "en"))
lang = Language(config.get("default_language", get_system_lang_code()))
debug = lang.get('log.debug', default="==DEBUG")
info = lang.get('log.info', default="===INFO")