forked from n-ando/OpenRTM-aist-Python
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
loggingを直接操作せずにRTC_TRACE等の関数からloggerプラグインのlog関数を介してloggingのerrorやwarn関数を呼んでいるため以下の機能が使えない。
errorやwarn関数を直接呼ばないためロギングを呼び出したファイル名(filename)、行番号(lineno)、ファイルの完全パス(pathname)、関数名(funcName)等の出力ができない- 以下のように複数のloggerプラグインで同一の初期化処理を実行しているが、1回実行すればいいので無駄である。
if LogstreamFile.s_logger is None:
LogstreamFile.s_logger = self
logging.PARANOID = logging.DEBUG - 3
logging.VERBOSE = logging.DEBUG - 2
logging.TRACE = logging.DEBUG - 1
logging.FATAL = logging.ERROR + 1
logging.addLevelName(logging.PARANOID, "PARANOID")
logging.addLevelName(logging.VERBOSE, "VERBOSE")
logging.addLevelName(logging.TRACE, "TRACE")
logging.addLevelName(logging.FATAL, "FATAL")- loggingはyamlファイルで各種設定ができるが、現状の実装では上記のようにプラグインごとに読み込み処理を書かなければならない。
Describe the solution you'd like
今までのRTC_TRACE関数等は廃止してloggingのlog関数を直接使うようにする。
loggingを使用することを前提として、機能を拡張する場合はloggingの独自ハンドラを追加するようにする。
Describe alternatives you've considered
Additional context
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request