Replace logging.basicConfig() with something more sensible

オープン
#254 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
55/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python

調査の方向性

Find where logging.basicConfig() runs in api.server and inspect the executable entrypoint in main.py. Check how the service is started and how tests or ASGI imports configure logging; the issue suggests moving configuration to main.py or guarding it when handlers already exist. Done means importing api.server no longer overrides logging configured by its host process.

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

説明

logging.basicConfig(...) is executed at module import time, which can override/lock in logging configuration for any process that imports api.server (including tests and ASGI servers). Consider moving logging configuration to the executable entrypoint (e.g., main.py) or only configuring if no handlers are present, to avoid side effects for library consumers.

if not logging.getLogger().hasHandlers():
    logging.basicConfig(level=os.getenv("LOGLEVEL", logging.INFO))

Originally posted by @Copilot in #253

主要言語
Python
スター
5
フォーク
4
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NCATSTranslator/NameResolution のほかの issue

NCATSTranslator/NameResolution の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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