修改减少modbus报警信息,以及websocket报警信息

This commit is contained in:
lixinyu1011
2025-11-08 15:18:52 +08:00
parent d4e1286df7
commit 45a778b928
2 changed files with 9 additions and 1 deletions

View File

@@ -191,6 +191,13 @@ def configure_logger(loglevel=None):
# 添加处理器到根日志记录器
root_logger.addHandler(console_handler)
# 降低第三方库的日志级别,避免过多输出
# pymodbus 库的日志太详细,设置为 WARNING
logging.getLogger('pymodbus').setLevel(TRACE_LEVEL)
logging.getLogger('pymodbus.logging').setLevel(TRACE_LEVEL)
logging.getLogger('pymodbus.logging.base').setLevel(TRACE_LEVEL)
logging.getLogger('pymodbus.logging.decoders').setLevel(TRACE_LEVEL)
# 配置日志系统