microsoftgraph / microsoftgraph/msgraph-sdk-python-core

Logging to root logger

未關閉 適合新手
#1,078 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

status:waiting-for-triage type:bug
主要語言
Python
星號
288
分支
52
平均合併
8 小時 10 分鐘
30 天內合併 PR
1

描述

Describe the bug

The library logs to the root logger. As that's a widely-accepted bad practice, I guess it qualifies as a bug.

https://github.com/microsoftgraph/msgraph-sdk-python-core/blob/7c2fe2754ab0b84f390e7f7aaca050c560ff286a/src/msgraph_core/requests/batch_request_builder.py#L70

https://github.com/microsoftgraph/msgraph-sdk-python-core/blob/7c2fe2754ab0b84f390e7f7aaca050c560ff286a/src/msgraph_core/tasks/large_file_upload.py#L133

Expected behavior

All log messages should go to module- or package-specific loggers.

How to reproduce
import logging
logging.basicConfig()

# Send a bad batch request
SDK Version

1.3.8

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output
Configuration

No response

Other information

No response

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

先從 src/msgraph_core/requests/batch_request_builder.py 第 70 行附近和 src/msgraph_core/tasks/large_file_upload.py 第 133 行附近開始,然後檢查它們的 logger 是如何建立的。使用 logging.basicConfig() 重現錯誤的 batch request。當兩個模組的日誌訊息都傳送到模組層級或套件層級的 logger,而不是 root logger 時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
api
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
冷清
描述清晰度
描述清楚
新手友好度
75/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。