elastic / elastic/ecs-logging-python
Add an example on how to configure with dictConfig + StdlibFormatter
- 主要语言
- Python
- 星标
- 74
- 派生
- 33
- 平均合并
- 9 小时 3 分钟
- 30 天内合并 PR
- 1
描述
```python
LOGGING_CONFIG = {
"format": "[%(asctime)s.%(msecs)03d] %(levelname)s %(name)s:%(funcName)s: %(message)s",
"datefmt": "%d/%b/%Y:%H:%M:%S",
},
+ "ecs": {
+ "()": "ecs_logging.StdlibFormatter"
+ },
"access": {"format": "%(message)s",},
},
"handlers": {
"default": {
"class": "logging.StreamHandler",
"stream": "ext://sys.stdout",
- "formatter": "default",
+ "formatter": "ecs",
},
"access_logs": {
"class": "logging.StreamHandler",
```
贡献指南
这个仓库没有索引到贡献指南
调研方向
The issue provides a Python LOGGING_CONFIG snippet showing dictConfig with ecs_logging.StdlibFormatter, but it does not name a documentation file or example location. Locate the project's configuration examples, add this usage there, and verify that the documented formatter and handler configuration matches the requested snippet.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100