feat(workers): Python skeleton + config + structlog
Plan 4 Phase A scaffolding. void-workers package at /workers/, sibling of /lib/. pyproject.toml pins Python 3.12 with separate extras for pdf / image / video / test. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
16
workers/void_workers/log.py
Normal file
16
workers/void_workers/log.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import logging
|
||||
import structlog
|
||||
|
||||
def init():
|
||||
structlog.configure(
|
||||
processors=[
|
||||
structlog.contextvars.merge_contextvars,
|
||||
structlog.processors.add_log_level,
|
||||
structlog.processors.TimeStamper(fmt="iso"),
|
||||
structlog.processors.JSONRenderer(),
|
||||
],
|
||||
wrapper_class=structlog.make_filtering_bound_logger(logging.INFO),
|
||||
)
|
||||
return structlog.get_logger()
|
||||
|
||||
log = init()
|
||||
Reference in New Issue
Block a user