Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SystemLoggerの仕様見直し #174

Open
Nobu19800 opened this issue Feb 18, 2020 · 0 comments
Open

SystemLoggerの仕様見直し #174

Nobu19800 opened this issue Feb 18, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Nobu19800
Copy link

Is your feature request related to a problem? Please describe.
loggingを直接操作せずにRTC_TRACE等の関数からloggerプラグインのlog関数を介してloggingのerrorwarn関数を呼んでいるため以下の機能が使えない。

  • errorwarn関数を直接呼ばないためロギングを呼び出したファイル名(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

@Nobu19800 Nobu19800 added the enhancement New feature or request label Feb 18, 2020
@Nobu19800 Nobu19800 self-assigned this Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant