apache / apache/pulsar-client-python
Multi Topic consumer not using client provided logger - MultiTopicsConsumerImpl:526 | Received Message from one of the topic
- 主要語言
- Python
- 星號
- 75
- 分支
- 53
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Instantiating a multi topic consumer, using a client with provided logger, result undesired debug logging, which logs the a dump of the message. This can result in extremely high logging storage cost.
**Here is how to reproduce :**
```python
...
pulsar_logger = logging.getLogger("pulsar")
pulsar_logger.setLevel(logging.INFO)
client = Client("your_pulsar_url", logger=pulsar_logger)
topics = ["topic1", "topic2", "topic3"]
consumer = client.subscribe(
topics,
subscription_name="subscription_name",
consumer_type=ConsumerType.KeyShared,
)
# generate some message using a producer
...
```
**What I expected to see :**
No logging with log level lower than INFO
**What I see :**
Dump of every single message received by the consumer:
```
2024-07-10 16:13:22.773 DEBUG [137957839206144] MultiTopicsConsumerImpl:526 | Received Message from one of the topic - DUMP_OF_THE_MESSAGE
```
**Environment :**
```
pulsar-client==3.5.0 (python)
apachepulsar/pulsar-all:3.0.2 (docker image)
python3.9
```
貢獻指南
研究方向
使用報告中的範例,透過 Python client、提供的 logger 和多主題 consumer 重現此問題。從 MultiTopicsConsumerImpl:526 開始,追蹤接收訊息的 log 如何輸出,以及使用了哪個 logger level。當將 client logger 設為 INFO 後不再 dump 訊息時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- distributed-systems
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100