GitHub user dosubot[bot] added a comment to the discussion: 容器启动后日志很快就把磁盘占用满了
<!-- Answer -->
SUPERSET_LOG_LEVEL 只控制 Superset 自己的日志级别,不能影响像 watchdog 这样的第三方库。watchdog 的 DEBUG
日志需要你在 superset_config.py 里用 Python logging 显式设置:
```python
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源码](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/config.py#L940-L2008)
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do?
[Good](https://app.dosu.dev/response-feedback/548429b6-f2b8-4039-b54b-d24a568ceb7b?feedback_type=great_response)
|
[Irrelevant](https://app.dosu.dev/response-feedback/548429b6-f2b8-4039-b54b-d24a568ceb7b?feedback_type=irrelevant_answer)
|
[Incorrect](https://app.dosu.dev/response-feedback/548429b6-f2b8-4039-b54b-d24a568ceb7b?feedback_type=incorrect_sources)
|
[Verbose](https://app.dosu.dev/response-feedback/548429b6-f2b8-4039-b54b-d24a568ceb7b?feedback_type=too_verbose)
|
[Hallucination](https://app.dosu.dev/response-feedback/548429b6-f2b8-4039-b54b-d24a568ceb7b?feedback_type=hallucination)
| [Report
🐛](https://app.dosu.dev/response-feedback/548429b6-f2b8-4039-b54b-d24a568ceb7b?feedback_type=bug_report)
|
[Other](https://app.dosu.dev/response-feedback/548429b6-f2b8-4039-b54b-d24a568ceb7b?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/36152)
GitHub link:
https://github.com/apache/superset/discussions/36152#discussioncomment-14996526
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
