feat: add configurable Dashboard API access log toggle #4661
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue: #4616
Add a configurable option to disable Dashboard API access logs. Currently, all API requests (frontend polling, health checks, etc.) generate INFO-level logs that clutter console output and obscure important business logs.
Modifications / 改动点
Files Changed:
astrbot/core/config/default.py: Addeddashboard.disable_access_logconfig (default:True)astrbot/dashboard/server.py: Modifiedrun()to conditionally disable Hypercorn access logdashboard/src/i18n/locales/*/config-metadata.json: Added translations (zh-CN, en-US)Implementation:
HyperConfig.accesslog = NoneScreenshots or Test Results / 运行截图或测试结果
Checklist / 检查清单
requirements.txt和pyproject.toml文件相应位置。/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations inrequirements.txtandpyproject.toml.Summary by Sourcery
添加一个可配置选项,用于切换 Dashboard API 访问日志,并通过后端默认配置和 WebUI 配置元数据进行串联。
新功能:
dashboard.disable_access_log配置标志,用于控制 Dashboard API 访问日志,默认禁用。改进:
dashboard.disable_access_log设置配置 Hypercorn 的访问日志。Original summary in English
Summary by Sourcery
Add a configurable option to toggle Dashboard API access logging and wire it through backend defaults and WebUI configuration metadata.
New Features:
Enhancements: