fluent / fluent/fluent-logger-python
FluentRecordFormatter._structuring may raise AttributeError
未關閉
- 主要語言
- 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
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
從 FluentRecordFormatter._structuring 開始,透過附加一個 fluent handler,然後呼叫 logger.info('1') 來重現該故障。確認 JSON scalar 和 list 的行為,並在這些訊息不再引發 AttributeError,而 dictionary 訊息繼續正常運作時,視為該 issue 已完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- observability
- Issue 類型
- 缺陷
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 52/100