issue: GLOBAL_LOG_LEVEL=DEBUG not being respected #5642

Closed
opened 2025-11-11 16:27:00 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @thomasbeaudry on GitHub (Jun 25, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Git Clone

Open WebUI Version

v0.6.15

Ollama Version (if applicable)

No response

Operating System

ubuntu server 24.04

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using 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 every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

The GLOBAL_LOG_LEVEL should be listed at DEBUG

Actual Behavior

The GLOBAL_LOG_LEVEL is listed as INFO

Steps to Reproduce

I followed the instructions from here:
https://docs.openwebui.com/getting-started/advanced-topics/logging/

Here is a snippet of my docker-compose.yml:

services:
  openwebui:
    image: ghcr.io/open-webui/open-webui:cuda
    ports:
      - "3000:8080"
    environment:
      - DEBUG=true
      - USE_CUDA_DOCKER=true
      - OLLAMA_BASE_URL=http://ollama:11434
      - GLOBAL_LOG_LEVEL=DEBUG
      - NVIDIA_VISIBLE_DEVICES=0
    runtime: nvidia
    volumes:
      - open-webui:/app/backend/data
    restart: unless-stopped
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]

I restart my docker compose stack, and when i check the log of the open-webui service i see that it still says that the log level is info:

Logs & Screenshots

docker log on a fresh restart:

Loading` WEBUI_SECRET_KEY from file, not provided as an environment variable.
Generating WEBUI_SECRET_KEY
Loading WEBUI_SECRET_KEY from .webui_secret_key
CUDA is enabled, appending LD_LIBRARY_PATH to include torch/cudnn & cublas libraries.
/app/backend/open_webui
/app/backend
/app

 ██████╗ ██████╗ ███████╗███╗   ██╗    ██╗    ██╗███████╗██████╗ ██╗   ██╗██╗
██╔═══██╗██╔══██╗██╔════╝████╗  ██║    ██║    ██║██╔════╝██╔══██╗██║   ██║██║
██║   ██║██████╔╝█████╗  ██╔██╗ ██║    █���║ █╗ ██║█████╗  ██████╔╝██║   ██║██║
██║   ██║██╔═══╝ ██╔══╝  ██║╚██╗██║    ██║███╗██║██╔══╝  ██╔══██╗██║   ██║██║
╚██████╔╝██║     ███████╗██║ ╚████║    ╚███╔███╔╝███████╗██████╔╝╚██████╔╝██║
 ╚═════╝ ╚═╝     ╚══════╝╚═╝  ╚═══╝     ╚══╝╚══╝ ╚══════╝╚═════╝  ╚═════╝ ╚═╝


v0.6.15 - building the best AI user interface.

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

2025-06-21 05:16:45.387 | INFO     | open_webui.utils.logger:start_logger:140 - GLOBAL_LOG_LEVEL: INFO - {}
2025-06-21 05:16:45.387 | INFO     | open_webui.main:lifespan:514 - Installing external dependencies of functions and tools... - {}
2025-06-21 05:16:45.394 | INFO     | open_webui.utils.plugin:install_frontmatter_requirements:241 - No requirements found in frontmatter. - {}

Additional Information

Just in case this is an XY problem, I'm really trying to capture the backend chat prompts that my users make.

Thanks!

Originally created by @thomasbeaudry on GitHub (Jun 25, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Git Clone ### Open WebUI Version v0.6.15 ### Ollama Version (if applicable) _No response_ ### Operating System ubuntu server 24.04 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior The GLOBAL_LOG_LEVEL should be listed at DEBUG ### Actual Behavior The GLOBAL_LOG_LEVEL is listed as INFO ### Steps to Reproduce I followed the instructions from here: https://docs.openwebui.com/getting-started/advanced-topics/logging/ Here is a snippet of my docker-compose.yml: ``` services: openwebui: image: ghcr.io/open-webui/open-webui:cuda ports: - "3000:8080" environment: - DEBUG=true - USE_CUDA_DOCKER=true - OLLAMA_BASE_URL=http://ollama:11434 - GLOBAL_LOG_LEVEL=DEBUG - NVIDIA_VISIBLE_DEVICES=0 runtime: nvidia volumes: - open-webui:/app/backend/data restart: unless-stopped deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: [gpu] ``` I restart my docker compose stack, and when i check the log of the open-webui service i see that it still says that the log level is info: ### Logs & Screenshots docker log on a fresh restart: ``` Loading` WEBUI_SECRET_KEY from file, not provided as an environment variable. Generating WEBUI_SECRET_KEY Loading WEBUI_SECRET_KEY from .webui_secret_key CUDA is enabled, appending LD_LIBRARY_PATH to include torch/cudnn & cublas libraries. /app/backend/open_webui /app/backend /app ██████╗ ██████╗ ███████╗███╗ ██╗ ██╗ ██╗███████╗██████╗ ██╗ ██╗██╗ ██╔═══██╗██╔══██╗██╔════╝████╗ ██║ ██║ ██║██╔════╝██╔══██╗██║ ██║██║ ██║ ██║██████╔╝█████╗ ██╔██╗ ██║ █���║ █╗ ██║█████╗ ██████╔╝██║ ██║██║ ██║ ██║██╔═══╝ ██╔══╝ ██║╚██╗██║ ██║███╗██║██╔══╝ ██╔══██╗██║ ██║██║ ╚██████╔╝██║ ███████╗██║ ╚████║ ╚███╔███╔╝███████╗██████╔╝╚██████╔╝██║ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚══╝╚══╝ ╚══════╝╚═════╝ ╚═════╝ ╚═╝ v0.6.15 - building the best AI user interface. https://github.com/open-webui/open-webui 2025-06-21 05:16:45.387 | INFO | open_webui.utils.logger:start_logger:140 - GLOBAL_LOG_LEVEL: INFO - {} 2025-06-21 05:16:45.387 | INFO | open_webui.main:lifespan:514 - Installing external dependencies of functions and tools... - {} 2025-06-21 05:16:45.394 | INFO | open_webui.utils.plugin:install_frontmatter_requirements:241 - No requirements found in frontmatter. - {} ``` ### Additional Information Just in case this is an XY problem, I'm really trying to capture the backend chat prompts that my users make. Thanks!
GiteaMirror added the bug label 2025-11-11 16:27:00 -06:00
Author
Owner

@thomasbeaudry commented on GitHub (Jun 26, 2025):

I saw that in the UI that I can export all chats as a json file which serves my needs. I still think this log level is an issue though that you guys could fix since I tried setting it to other values with no change to the docker logs

@thomasbeaudry commented on GitHub (Jun 26, 2025): I saw that in the UI that I can export all chats as a json file which serves my needs. I still think this log level is an issue though that you guys could fix since I tried setting it to other values with no change to the docker logs
Author
Owner

@tjbck commented on GitHub (Jun 26, 2025):

The logs should output both INFO and DEBUG, is this not the case for you?

@tjbck commented on GitHub (Jun 26, 2025): The logs should output both INFO and DEBUG, is this not the case for you?
Author
Owner

@rgaricano commented on GitHub (Jun 26, 2025):

DEBUG is not a Open-WebUI env var, maybe your asignation DEBUG=true is interfering and it is used in next asignation GLOBAL_LOG_LEVEL=DEBUG ¿?

you can try removing env var DEBUG=true &| use GLOBAL_LOG_LEVEL="DEBUG"

my init log:

...
startssh.sh[55160]: INFO:open_webui.env:GLOBAL_LOG_LEVEL: DEBUG
...
startssh.sh[55160]: 2025-06-26 09:54:58.626 | INFO     | open_webui.utils.logger:start_logger:140 - GLOBAL_LOG_LEVEL: DEBUG - {}
...
@rgaricano commented on GitHub (Jun 26, 2025): `DEBUG` is not a Open-WebUI env var, maybe your asignation `DEBUG=true` is interfering and it is used in next asignation `GLOBAL_LOG_LEVEL=DEBUG` ¿? you can try removing env var `DEBUG=true` &| use `GLOBAL_LOG_LEVEL="DEBUG"` my init log: ``` ... startssh.sh[55160]: INFO:open_webui.env:GLOBAL_LOG_LEVEL: DEBUG ... startssh.sh[55160]: 2025-06-26 09:54:58.626 | INFO | open_webui.utils.logger:start_logger:140 - GLOBAL_LOG_LEVEL: DEBUG - {} ... ```
Author
Owner

@mykola-mmm commented on GitHub (Jun 26, 2025):

@thomasbeaudry on my side everything is working as expected (tag v0.6.15)

@mykola-mmm commented on GitHub (Jun 26, 2025): @thomasbeaudry on my side everything is working as expected (tag v0.6.15)
Author
Owner

@thomasbeaudry commented on GitHub (Jun 26, 2025):

Hi,

Thanks for the quick replies!

I can confirm that:

  1. Removing the DEBUG=true line and only having GLOBAL_LOG_LEVEL="DEBUG" works for a fresh install and sets the GLOBAL_LOG_LEVEL to DEBUG

  2. Doing this on my current container doesn't change the GLOBAL_LOG_LEVEL settings, and it's stuck on INFO, even with the other environment variables removed, i.e:

services:
  openwebui:
    image: ghcr.io/open-webui/open-webui:cuda
    ports:
      - "3000:8080"
    environment:
      - GLOBAL_LOG_LEVEL="DEBUG"
    volumes:
      - open-webui:/app/backend/data
@thomasbeaudry commented on GitHub (Jun 26, 2025): Hi, Thanks for the quick replies! I can confirm that: 1. Removing the DEBUG=true line and only having GLOBAL_LOG_LEVEL="DEBUG" works for a fresh install and sets the GLOBAL_LOG_LEVEL to DEBUG 2. Doing this on my current container doesn't change the GLOBAL_LOG_LEVEL settings, and it's stuck on INFO, even with the other environment variables removed, i.e: ``` services: openwebui: image: ghcr.io/open-webui/open-webui:cuda ports: - "3000:8080" environment: - GLOBAL_LOG_LEVEL="DEBUG" volumes: - open-webui:/app/backend/data ```
Author
Owner

@rgaricano commented on GitHub (Jun 26, 2025):

The only think that I can think is that the logging mapped tree is set to INFO

As I kow, the only Log Level assignation is done in:

b5f4c85bb1/backend/open_webui/env.py (L69-L73)

getLevelNamesMapping check what is the level in log tree,
maybe there are some level asignation in python env....¿?
(I'm sorry but I don't have the logging topic memorized very well.)

@rgaricano commented on GitHub (Jun 26, 2025): The only think that I can think is that the logging mapped tree is set to INFO As I kow, the only Log Level assignation is done in: https://github.com/open-webui/open-webui/blob/b5f4c85bb196c16a775802907aedd87366f58b0f/backend/open_webui/env.py#L69-L73 [getLevelNamesMapping](https://docs.python.org/3/library/logging.html#logging.getLevelNamesMapping) check what is the level in log tree, maybe there are some level asignation in python env....¿? (I'm sorry but I don't have the logging topic memorized very well.)
Author
Owner

@mykola-mmm commented on GitHub (Jun 26, 2025):

@thomasbeaudry can you share the docker command you use to run the container?
also, could you run "docker exec -it env | grep GLOBAL_LOG_LEVEL" and share the result?

@mykola-mmm commented on GitHub (Jun 26, 2025): @thomasbeaudry can you share the docker command you use to run the container? also, could you run "docker exec -it <container id> env | grep GLOBAL_LOG_LEVEL" and share the result?
Author
Owner

@thomasbeaudry commented on GitHub (Jun 27, 2025):

@mykola-mmm

I'm running it with docker compose up -d

From the docker logs:

INFO:     Waiting for application startup.
2025-06-27 15:15:59.358 | INFO     | open_webui.utils.logger:start_logger:140 - GLOBAL_LOG_LEVEL: INFO - {}
2025-06-27 15:15:59.358 | INFO     | open_webui.main:lifespan:514 - Installing external dependencies of functions and tools... - {}
2025-06-27 15:15:59.365 | INFO     | open_webui.utils.plugin:install_frontmatter_requirements:241 - No requirements found in frontmatter. - {}

The env has the correct log level, just not the app:

root@dnpgpu01:/opt/open-webui# docker exec -it open-webui-openwebui-1 env | grep GLOBAL_LOG_LEVEL
GLOBAL_LOG_LEVEL="DEBUG"

If it helps, here is my docker compose file

root@dnpgpu01:/opt/open-webui# cat docker-compose.yml
services:
  openwebui:
    image: ghcr.io/open-webui/open-webui:cuda
    ports:
      - "3000:8080"
    environment:
      - GLOBAL_LOG_LEVEL="DEBUG"
      - USE_CUDA_DOCKER=true
      - OLLAMA_BASE_URL=http://ollama:11434
      - NVIDIA_VISIBLE_DEVICES=0

    runtime: nvidia
    volumes:
      - open-webui:/app/backend/data
    restart: unless-stopped
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]

  ollama:
    image: ollama/ollama:latest
    ports:
      - "11434:11434"
    volumes:
      - ollama-data:/root/.ollama
    environment:
      - OLLAMA_DEBUG=1
      - OLLAMA_NUM_PARALLEL=1
      - OLLAMA_SCHED_SPREAD=true
      - OLLAMA_ORIGINS=http://localhost:3000,http://127.0.0.1:3000
      - NVIDIA_VISIBLE_DEVICES=0
    runtime: nvidia
    restart: unless-stopped

  llama:
    image: ghcr.io/ggml-org/llama.cpp:server-cuda
    container_name: llama_server_gpu
    ports:
      - "8000:8000"
    volumes:
      - ./models:/models
    environment:
      - LLAMA_ARG_MODEL=/models/Qwen3-8B-UD-Q4_K_XL.gguf
      - LLAMA_ARG_PORT=8000
      - LLAMA_ARG_HOST=0.0.0.0
      - LLAMA_ARG_N_CTX=32768  # Qwen3 supports up to 32,768 tokens
      - LLAMA_ARG_N_GPU_LAYERS=999  # Offload all layers to GPU
      - LLAMA_ARG_TEMP=0.6
      - LLAMA_ARG_TOP_P=0.95
      - LLAMA_ARG_TOP_K=20
      - GGML_CUDA_NO_PINNED=1
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
    restart: unless-stopped

volumes:
  ollama-data:
  open-webui:
@thomasbeaudry commented on GitHub (Jun 27, 2025): @mykola-mmm I'm running it with docker compose up -d From the docker logs: ``` INFO: Waiting for application startup. 2025-06-27 15:15:59.358 | INFO | open_webui.utils.logger:start_logger:140 - GLOBAL_LOG_LEVEL: INFO - {} 2025-06-27 15:15:59.358 | INFO | open_webui.main:lifespan:514 - Installing external dependencies of functions and tools... - {} 2025-06-27 15:15:59.365 | INFO | open_webui.utils.plugin:install_frontmatter_requirements:241 - No requirements found in frontmatter. - {} ``` The env has the correct log level, just not the app: ``` root@dnpgpu01:/opt/open-webui# docker exec -it open-webui-openwebui-1 env | grep GLOBAL_LOG_LEVEL GLOBAL_LOG_LEVEL="DEBUG" ``` If it helps, here is my docker compose file ``` root@dnpgpu01:/opt/open-webui# cat docker-compose.yml services: openwebui: image: ghcr.io/open-webui/open-webui:cuda ports: - "3000:8080" environment: - GLOBAL_LOG_LEVEL="DEBUG" - USE_CUDA_DOCKER=true - OLLAMA_BASE_URL=http://ollama:11434 - NVIDIA_VISIBLE_DEVICES=0 runtime: nvidia volumes: - open-webui:/app/backend/data restart: unless-stopped deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: [gpu] ollama: image: ollama/ollama:latest ports: - "11434:11434" volumes: - ollama-data:/root/.ollama environment: - OLLAMA_DEBUG=1 - OLLAMA_NUM_PARALLEL=1 - OLLAMA_SCHED_SPREAD=true - OLLAMA_ORIGINS=http://localhost:3000,http://127.0.0.1:3000 - NVIDIA_VISIBLE_DEVICES=0 runtime: nvidia restart: unless-stopped llama: image: ghcr.io/ggml-org/llama.cpp:server-cuda container_name: llama_server_gpu ports: - "8000:8000" volumes: - ./models:/models environment: - LLAMA_ARG_MODEL=/models/Qwen3-8B-UD-Q4_K_XL.gguf - LLAMA_ARG_PORT=8000 - LLAMA_ARG_HOST=0.0.0.0 - LLAMA_ARG_N_CTX=32768 # Qwen3 supports up to 32,768 tokens - LLAMA_ARG_N_GPU_LAYERS=999 # Offload all layers to GPU - LLAMA_ARG_TEMP=0.6 - LLAMA_ARG_TOP_P=0.95 - LLAMA_ARG_TOP_K=20 - GGML_CUDA_NO_PINNED=1 deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: [gpu] restart: unless-stopped volumes: ollama-data: open-webui: ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#5642