fluent / fluent/fluent-logger-python
FluentRecordFormatter._structuring may raise AttributeError
- Langage dominant
- Python
- Étoiles
- 457
- Forks
- 138
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
`json.loads(str(msg))` may not return a dict, it can return:
- int if `msg` is a json dumped from an int, for example `msg = '123'`
- list if `msg` is a json dumped from a list, for example `msg = '["s", "1"]'`
Only dict have items() method.
So if you get a logger and add a fluent.handler to it, then you execute
`logger.info('1')`
you will get an AttributeError
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Start at FluentRecordFormatter._structuring and reproduce the failure by attaching a fluent handler, then calling logger.info('1'). Confirm the behavior for JSON scalars and lists, and consider the issue done when these messages no longer raise AttributeError while dictionary messages continue to work.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- observability
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 52/100