[GH-ISSUE #7859] Any value for GLOBAL_LOG_LEVEL="" is not respected #14912

Closed
opened 2026-04-19 21:09:37 -05:00 by GiteaMirror · 7 comments
Owner

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:

dependencies:
  - name: open-webui 
    version: "4.1.0"
    repository: https://open-webui.github.io/helm-charts

Environment

  • Open WebUI Version: v0.4.8
  • Ollama: v0.4.6

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

Setting "GLOBAL_LOG_LEVEL"="CRITICAL" should make the logging pipeline to only log CRITICAL events

Actual Behavior:

Setting the above variable makes no difference, logs is still being logged in INFO mode, 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:

  • Run the openwebui (ghcr.io/open-webui/open-webui:0.4.8) with env var GLOBAL_LOG_LEVEL set to CRITICAL

Docker Container Logs:


v0.4.8 - building the best open-source AI user interface.

https://github.com/open-webui/open-webui

INFO:     Started server process [1]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
INFO:     10.20.10.120:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=PF8uuTj HTTP/1.1" 200 OK
INFO:     10.20.10.120:0 - "POST /ws/socket.io/?EIO=4&transport=polling&t= HTTP/1.1" 200 OK
INFO:     10.20.10.120:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t= HTTP/1.1" 200 OK
INFO:     ('10.20.10.120', 0) - "WebSocket /ws/socket.io/?EIO=4&transport=websocket&sid=" [accepted]
INFO:     connection open
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: ``` dependencies: - name: open-webui version: "4.1.0" repository: https://open-webui.github.io/helm-charts ``` ## Environment - **Open WebUI Version:** v0.4.8 - **Ollama:** v0.4.6 **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [ ] I have included the browser console logs. - [x] I have included the Docker container logs. - [ ] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: Setting `"GLOBAL_LOG_LEVEL"="CRITICAL"` should make the logging pipeline to only log CRITICAL events ## Actual Behavior: Setting the above variable makes no difference, logs is still being logged in `INFO` mode, 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:** * Run the openwebui (ghcr.io/open-webui/open-webui:0.4.8) with env var `GLOBAL_LOG_LEVEL` set to `CRITICAL` **Docker Container Logs:** ``` v0.4.8 - building the best open-source AI user interface. https://github.com/open-webui/open-webui INFO: Started server process [1] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit) INFO: 10.20.10.120:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t=PF8uuTj HTTP/1.1" 200 OK INFO: 10.20.10.120:0 - "POST /ws/socket.io/?EIO=4&transport=polling&t= HTTP/1.1" 200 OK INFO: 10.20.10.120:0 - "GET /ws/socket.io/?EIO=4&transport=polling&t= HTTP/1.1" 200 OK INFO: ('10.20.10.120', 0) - "WebSocket /ws/socket.io/?EIO=4&transport=websocket&sid=" [accepted] INFO: connection open ```
Author
Owner

@twhite-gh commented on GitHub (Dec 16, 2024):

same as you. not working.

<!-- gh-comment-id:2544689262 --> @twhite-gh commented on GitHub (Dec 16, 2024): same as you. not working.
Author
Owner

@TheMasterFX commented on GitHub (Dec 16, 2024):

Try without quotes GLOBAL_LOG_LEVEL=CRITICAL

<!-- gh-comment-id:2545943138 --> @TheMasterFX commented on GitHub (Dec 16, 2024): Try without quotes ``GLOBAL_LOG_LEVEL=CRITICAL``
Author
Owner

@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 prefix INFO so I assume some components are not being affected by it.

<!-- gh-comment-id:2546993484 --> @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 prefix `INFO` so I assume some components are not being affected by it.
Author
Owner

@Adhithya03 commented on GitHub (Dec 24, 2024):

@nebula-it @twhite-gh

The log message you're seeing:

INFO:     127.0.0.1:52458 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK

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

  1. For Windows:
    Navigate to:
    C:\Users\%**YOUR USER NAME**%\AppData\Local\Programs\Python\Python311\Lib\site-packages\open_webui

  2. For Other OS or Virtual Environments:
    Locate the site-packages directory 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_webui

  3. Locate the __init__.py script in the directory.

  4. Refer to the images below to see what needs to be added and where.

What to Add and Where

Image showing the required additions

Result

Image showing the expected outcome

You can use other log levels as you wish, or refer to the environment variable here.

<!-- gh-comment-id:2561197711 --> @Adhithya03 commented on GitHub (Dec 24, 2024): @nebula-it @twhite-gh The log message you're seeing: ``` INFO: 127.0.0.1:52458 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK ``` 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 1. **For Windows**: Navigate to: `C:\Users\%**YOUR USER NAME**%\AppData\Local\Programs\Python\Python311\Lib\site-packages\open_webui` 2. **For Other OS or Virtual Environments**: Locate the `site-packages` directory 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_webui` 3. Locate the `__init__.py` script in the directory. 4. Refer to the images below to see what needs to be added and where. ### What to Add and Where ![Image showing the required additions](https://github.com/user-attachments/assets/20547ac1-84ff-4418-bdcc-7bb3c319d094) ### Result ![Image showing the expected outcome](https://github.com/user-attachments/assets/f8302c34-b37a-4d2c-a92a-d96eca6116db) You can use other log levels as you wish, or refer to the environment variable here.
Author
Owner

@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__.py if anyone needs it.

@Adhithya03 any chance you can do a PR to update this value automatically from env var? 🙏

<!-- gh-comment-id:2561424891 --> @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__.py` if anyone needs it. @Adhithya03 any chance you can do a PR to update this value automatically from env var? 🙏
Author
Owner

@Adhithya03 commented on GitHub (Dec 25, 2024):

Hello @nebula-it,

I've just opened a PR #8053.

<!-- gh-comment-id:2561625350 --> @Adhithya03 commented on GitHub (Dec 25, 2024): Hello @nebula-it, I've just opened a PR #8053.
Author
Owner

@nebula-it commented on GitHub (Dec 25, 2024):

Perfect, thanks much bud.
With that, I'll close this issue.

<!-- gh-comment-id:2561633574 --> @nebula-it commented on GitHub (Dec 25, 2024): Perfect, thanks much bud. With that, I'll close this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#14912