Implement Prometheus data exporters for CPU fan temperature and HDD temperature, along with utility functions for logging and command execution.

This commit is contained in:
2025-02-05 10:47:08 +08:00
parent d34588467b
commit 665a8ea05a
8 changed files with 546 additions and 0 deletions

15
awinlib/__init__.py Normal file
View File

@@ -0,0 +1,15 @@
import logging
from rich.logging import RichHandler
LOGFORMAT_RICH = '%(thread)d %(message)s'
richHandler = RichHandler(
rich_tracebacks=True,
)
richHandler.setFormatter(logging.Formatter(LOGFORMAT_RICH))
logging.basicConfig(
level=logging.INFO,
handlers=[
richHandler,
]
)