elastic / elastic/ecs-logging-python

how to prefix structlog log value with "custom." or route them to a certain ecs field

Ouverte
#52 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
agent-python
Langage dominant
Python
Étoiles
74
Forks
33
Merge moyen
9 h 3 min
PR mergées (30 j)
1

Description

Hi,
according to the ecs documentation non ecs standard fields should go under "custom."
Also I might log data that should go to a certain ecs field

but i'm not sure how to configure something like this in structlog/ecs-logging.

for example this:
```python
req_id = uuid()
...
logger.info("something happend", foo="123", request_id=req_id)

```
should end up being something like this:
```json
{
"http.request.id" : "",
"message": "something happend",
"custom.foo" : 123
...
}
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.