16 lines
289 B
Python
16 lines
289 B
Python
import logging
|
|
|
|
from rich.logging import RichHandler
|
|
|
|
LOGFORMAT_RICH = '%(message)s'
|
|
richHandler = RichHandler(
|
|
rich_tracebacks=True,
|
|
)
|
|
richHandler.setFormatter(logging.Formatter(LOGFORMAT_RICH))
|
|
logging.basicConfig(
|
|
level=logging.INFO,
|
|
handlers=[
|
|
richHandler,
|
|
]
|
|
)
|