fluent / fluent/fluent-logger-python

FluentRecordFormatter._structuring may raise AttributeError

オープン
#45 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
457
フォーク
138
PR マージ指標
30日以内にマージされた PR はありません

説明

`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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
observability
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
52/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。