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:
15
awinlib/__init__.py
Normal file
15
awinlib/__init__.py
Normal 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,
|
||||
]
|
||||
)
|
||||
Reference in New Issue
Block a user