mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[GH-ISSUE #7859] Any value for GLOBAL_LOG_LEVEL="" is not respected #53578
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?
Originally created by @nebula-it on GitHub (Dec 15, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/7859
Bug Report
Installation Method
Helm Chart:
Environment
Confirmation:
Expected Behavior:
Setting
"GLOBAL_LOG_LEVEL"="CRITICAL"should make the logging pipeline to only log CRITICAL eventsActual Behavior:
Setting the above variable makes no difference, logs is still being logged in
INFOmode, as evident from the console logs below.Description
Bug Summary:
Env var GLOBAL_LOG_LEVEL="" is not respected when logging to console
Reproduction Details
Steps to Reproduce:
GLOBAL_LOG_LEVELset toCRITICALDocker Container Logs:
@twhite-gh commented on GitHub (Dec 16, 2024):
same as you. not working.
@TheMasterFX commented on GitHub (Dec 16, 2024):
Try without quotes
GLOBAL_LOG_LEVEL=CRITICAL@nebula-it commented on GitHub (Dec 16, 2024):
Yeah that seems to have made some change, now the logs starting wtih
[open_webui.env]dont show up but the access logs for http server are still there and they all have a prefixINFOso I assume some components are not being affected by it.@Adhithya03 commented on GitHub (Dec 24, 2024):
@nebula-it @twhite-gh
The log message you're seeing:
is generated by Uvicorn's access log, which records each HTTP request received by the server.
Temporary Fix for the Issue
This is a temporary fix until the author updates the variables in the code. Follow these steps to resolve the issue:
Steps
For Windows:
Navigate to:
C:\Users\%**YOUR USER NAME**%\AppData\Local\Programs\Python\Python311\Lib\site-packages\open_webuiFor Other OS or Virtual Environments:
Locate the
site-packagesdirectory within your Python environment. If you're using a virtual environment (venv), it will typically be in:path_to_venv/lib/pythonX.X/site-packages/open_webuiLocate the
__init__.pyscript in the directory.Refer to the images below to see what needs to be added and where.
What to Add and Where
Result
You can use other log levels as you wish, or refer to the environment variable here.
@nebula-it commented on GitHub (Dec 24, 2024):
Hey @Adhithya03
Thank you for digging that one up. I've updated that file using
sed -i 's|^\( uvicorn\.run\(.*\)\))|\1, log_level="critical")|' __init__.pyif anyone needs it.@Adhithya03 any chance you can do a PR to update this value automatically from env var? 🙏
@Adhithya03 commented on GitHub (Dec 25, 2024):
Hello @nebula-it,
I've just opened a PR #8053.
@nebula-it commented on GitHub (Dec 25, 2024):
Perfect, thanks much bud.
With that, I'll close this issue.