Skip to content
Discussion options

You must be logged in to vote

SUPERSET_LOG_LEVEL 只控制 Superset 自己的日志级别,不能影响像 watchdog 这样的第三方库。watchdog 的 DEBUG 日志需要你在 superset_config.py 里用 Python logging 显式设置:

import logging

logging.getLogger("watchdog").setLevel(logging.ERROR)
logging.getLogger("watchdog.observers.inotify_buffer").setLevel(logging.ERROR)

这样可以抑制 watchdog 的 DEBUG 日志,避免日志把磁盘占满。确认 superset_config.py(或 superset_config_docker.py)已被容器正确加载,否则这些设置不会生效。可以在配置文件顶部加一行 raise Exception("config loaded"),重启容器后如果日志里出现异常说明配置已加载。

参考:Superset logging config源码

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jiderox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant