mirror of
https://github.com/markbeep/AudioBookRequest.git
synced 2026-01-25 07:29:50 -06:00
21 lines
627 B
Python
21 lines
627 B
Python
import logging
|
|
|
|
import structlog
|
|
|
|
structlog.configure(
|
|
processors=[
|
|
structlog.contextvars.merge_contextvars,
|
|
structlog.processors.add_log_level,
|
|
structlog.processors.StackInfoRenderer(),
|
|
structlog.dev.set_exc_info,
|
|
structlog.processors.TimeStamper(fmt="%Y-%m-%d %H:%M:%S", utc=False),
|
|
structlog.dev.ConsoleRenderer(),
|
|
],
|
|
wrapper_class=structlog.make_filtering_bound_logger(logging.NOTSET),
|
|
context_class=dict,
|
|
logger_factory=structlog.PrintLoggerFactory(),
|
|
cache_logger_on_first_use=False,
|
|
)
|
|
|
|
logger: structlog.stdlib.BoundLogger = structlog.get_logger()
|