taolib.symphony.observability.logging#
结构化日志配置。
基于 structlog,支持 JSON 和 key=value 两种输出格式。 所有问题相关日志自动携带 issue_id、issue_identifier 上下文。
Functions#
|
配置 structlog。 |
|
绑定 issue 上下文到当前协程。 |
|
清除 issue 上下文。 |
|
获取绑定名称的结构化日志器。 |
Module Contents#
- taolib.symphony.observability.logging.configure_logging(level: str = 'info', format: str = 'json', output: str = 'stderr') None#
配置 structlog。
- 参数:
level -- 日志级别,如 "debug"、"info"、"warning"、"error"。
format -- 输出格式,"json" 或 "console"。
output -- 输出目标,"stderr" 或 "stdout"。