elastic / elastic/ecs-logging-python
Add an example on how to configure with dictConfig + StdlibFormatter
- Dominant language
- Python
- Stars
- 74
- Forks
- 33
- Avg merge
- 9h 3m
- Merged PRs (30d)
- 1
Description
```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",
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.