fluent / fluent/fluent-logger-python

support of `asctime`

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

説明

It would be great to support both milliseconds and timezone in the datefmt, for example: `%Y-%m-%dT%H:%M:%S,%f%z`. (I used `%f `for milliseconds, even though it's not supported by` datetime.strftime`.)

I understand this limitation comes from the standard library formatter `logging.Formatter`, but if `fluent-logger-python` could work around or resolve it, that would be very helpful.

As a work around, user may provide a `format_time(record, datefmt)` function to the constructor instead of relying on the `logging.Formatter.formatTime`

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

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

調査の方向性

まず、Python's logging.Formatter.formatTime の動作と、issue で説明されている logger コンストラクターの workaround である format_time(record, datefmt) を読みます。現在 datefmt がどのように渡されているかを確認し、その後、%Y-%m-%dT%H:%M:%S,%f%z のような形式でミリ秒とタイムゾーン情報が生成されることを検証します。

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

評価

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

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

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