elastic / elastic/ecs-logging-python

Add a context manager for temporarily adding extras to StdlibLogger

未关闭
#14 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
74
派生
33
平均合并
9 小时 3 分钟
30 天内合并 PR
1

描述

Similar to how structlog provides `.bind()` we could provide a context manager that adds extras so you don't have to include them every time you call `.info()`, etc.

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先定位 StdlibLogger 的实现,并检查其 .info() 及相关方法如何接受 extras。将请求的行为与 structlog's .bind() 进行比较;done 应该是一个上下文管理器,临时将 extras 添加到日志调用中,并在之后恢复之前的上下文,同时编写测试覆盖进入和退出时的行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
observability-sre
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
28/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。