mirror of
https://github.com/open-webui/terminals.git
synced 2026-11-05 01:37:21 +00:00
[PR #26] [CLOSED] feat: make log level configurable #51
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/terminals#51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/terminals/pull/26
Author: @james-westbrook
Created: 5/24/2026
Status: ❌ Closed
Base:
main← Head:feat-log-levels📝 Commits (2)
445db92feat: make log level configurable via TERMINALS_LOG_LEVEL0f21619style: trim verbose comment on stdlib logging intercept📊 Changes
4 files changed (+52 additions, -3 deletions)
View changed files
📝
README.md(+1 -0)📝
operator/handler.py(+24 -1)📝
terminals/config.py(+3 -0)📝
terminals/logging.py(+24 -2)📄 Description
What
Adds a
TERMINALS_LOG_LEVELenvironment variable to control logging verbosity. Closes #21.The loguru sink was previously hard-coded to
DEBUG, which is noisy in production and offered no way to adjust verbosity. This makes the level configurable, defaulting toINFO.Changes
terminals/config.py— newlog_levelsetting (TERMINALS_LOG_LEVEL, defaultINFO).terminals/logging.py— the loguru sink now uses the configured level. Invalid values fall back toINFOwith a warning. Thelevel=0stdlib intercept is retained intentionally so loguru remains the single arbiter of what gets emitted (uvicorn/sqlalchemy logs included).operator/handler.py— the operator reads the same env var and sets the root stdlib + kopf posting level accordingly. Loguru-only levels (TRACE,SUCCESS) map to their nearest stdlib equivalents.README.md— documents the new variable.Accepted values:
TRACE,DEBUG,INFO,SUCCESS,WARNING,ERROR,CRITICAL.Testing
Verified manually that the sink honors the configured level (e.g.
WARNINGsuppressesDEBUG/INFO), and that an invalid value (e.g.bogus) falls back toINFOwith a warning. No automated test suite is present in the repo.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.