fluent / fluent/fluent-logger-python

emit() does not call handleError on exception.

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

説明

The [documentation](https://docs.python.org/3.8/library/logging.html#logging.Handler.handleError) for the `handleError` function of `logging.Handler` implies that exceptions should be caught by `emit` and handled by invoking `handleError`. This allows the environment to customer how logging errors are handled.

The fluent logger Handler does not do this: https://github.com/fluent/fluent-logger-python/blob/d1b81bafe442f9cd3059fa07da1fd8de4e92716c/fluent/handler.py#L237

The net result is that exceptions triggered when running the fluent logger (either in format or otherwise) are raised, as opposed to log, which is inconsistent with the rest of the logging Handlers.

The fluent logger should call handleError.

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

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

調査の方向性

Start in fluent/handler.py around line 237 and compare the Handler's emit behavior with the Python logging.Handler.handleError documentation. Trace exceptions raised during formatting or logging, then verify that the fluent logger invokes handleError instead of propagating them.

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

評価

技術スタック
python
領域
observability
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
48/100

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

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