google / google/python-fire

Feature Request: Add logging level support as a default parameter for functions

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

説明

It would be nice to add a logging level option as a default option for all methods.

An ideal implementation would be like a decorator for a function: when a function is decorated, then the function will be added with `[--log-level INFO]` without specifying so.

For example, a method with a decorator:
```puthon
@fire.logger(logger_object):
def a_method(params1):
logger_object.debug('log line')
```

Will actually make `a_method(param1)` works like `a_method(param1, log_level=logging.INFO)`.

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

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

評価

この issue はまだ評価されていません。

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

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