mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-05 18:38:17 -05:00
[PR #10868] [MERGED] chore: use logging.getLevelNamesMapping() for validating log level #45658
Reference in New Issue
Block a user
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/open-webui/pull/10868
Author: @tidely
Created: 2/27/2025
Status: ✅ Merged
Merged: 3/4/2025
Merged by: @tjbck
Base:
dev← Head:loggingnamemap📝 Commits (1)
d7b18b6chore: use logging.getLevelNamesMapping()📊 Changes
1 file changed (+2 additions, -4 deletions)
View changed files
📝
backend/open_webui/env.py(+2 -4)📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Use
logging.getLevelNamesMapping()for validating logging levels set from environment variables.Description
Use
logging.getLevelNamesMapping()for getting all valid logging levels. This also allows adding new ones usinglogging.addLevel(). This feature was added in Python 3.11 which is above the minimum supported Python version for open-webui.Example output of the function:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.