取消中文日志

中文日志没有必要,减低代码耦合
This commit is contained in:
mofeng-git 2024-11-20 12:40:09 +00:00
parent 3ec872878e
commit baa0f7e226
3 changed files with 4 additions and 20 deletions

View File

@ -2,10 +2,6 @@ kvmd:
auth: auth:
enabled: true enabled: true
server:
unix_mode: 0666
access_log_format: '[%P / %{X-Real-IP}i] ''%r'' => 响应:%s大小%b来源''%{Referer}i'';用户代理:''%{User-Agent}i'''
atx: atx:
type: disabled type: disabled
@ -161,9 +157,4 @@ nginx:
http: http:
port: 8080 port: 8080
https: https:
port: 4430 port: 4430
languages:
console: zh
web: zh

View File

@ -30,17 +30,12 @@ from xmlrpc.client import ServerProxy
from ...logging import get_logger from ...logging import get_logger
us_systemd_journal = True
try: try:
import systemd.journal import systemd.journal
except ImportError as e: except ImportError:
get_logger(0).error("Failed to import module: %s", "systemd.journal")
us_systemd_journal = False
try:
import supervisor.xmlrpc import supervisor.xmlrpc
except ImportError as e: us_systemd_journal = False
get_logger(0).info("Failed to import module: %s", "supervisor.xmlrpc")
us_systemd_journal = True
# ===== # =====

View File

@ -136,8 +136,6 @@ class _GpioOutput: # pylint: disable=too-many-instance-attributes
self.__region = aiotools.AioExclusiveRegion(GpioChannelIsBusyError, notifier) self.__region = aiotools.AioExclusiveRegion(GpioChannelIsBusyError, notifier)
self.gettext=Languages().gettext
def is_const(self) -> bool: def is_const(self) -> bool:
return (not self.__switch and not self.__pulse_delay) return (not self.__switch and not self.__pulse_delay)