Worker logging doesn't work

未关闭
#634 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
22/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
kafka, python

调研方向

The report points to the logging changes in faust/worker.py from PR 368 and to override_logging in the parent mode.Worker class, which controls whether the app's logging_config is applied. Start by reading how the worker sets up logging at startup and compare it with the 0.8.10 version. Done means the worker's startup messages appear under a user-supplied logging_config on the current master, with a test covering that path.

由索引模型根据 Issue 内容生成。

描述

Checklist

  • I have included information about relevant versions
  • I have verified that the issue persists when using the master branch of Faust.

Steps to reproduce

After upgrade to faust-streaming > 0.8.10 (PR: https://github.com/faust-streaming/faust/pull/368) I am not able to force faust to logging any info from Worker. When app sis starting, only +ƒaµS† v0.8.11+ table info is printed and any warnings before.
Before version 0.8.11 it was working like that.
When I am using logging_config in faust.App (0.8.10) my logging configuration is fine. Since 0.8.11 it is not.

When you change lines back in faust/worker.py (reverse PR changes), then everything is working fine.
The same, when override_logging is changed to False in source code of mode.Worker (parent of faust.Worker)

Any idea whats wrong or how to handle logging?

Expected behavior

Faust print info like:

[^Worker]: Starting...
[^-App]: Starting...
[^-App]: Started.
Executing _on_partitions_assigned
[^Worker]: Ready
[^Worker]: Started.

based on defined logging configuration as well as info about processed events.

Actual behavior

Only +ƒaµS† v0.8.11+ table info is printed to log and warinign before. After that nothing is logged, even errors related to communication issue.

Full traceback

n/a

Versions

  • Python version: 3.10
  • Faust versio: starting from 0.8.11
  • Operating system: Windows/Linux container
  • aiokafka: 0.10.0
  • Django 4.2.11
主要语言
Python
星标
1.9k
派生
205
平均合并
2 小时 2 分钟
30 天内合并 PR
1

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

faust-streaming/faust 的其他 Issue

查看 faust-streaming/faust 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。