This pull request introduces an enhancement that allows users to configure the log level of the Uvicorn server through the GLOBAL_LOG_LEVEL environment variable. By making the log level configurable, developers and users can adjust the verbosity of the server logs according to their needs.
Changes Made:
Import GLOBAL_LOG_LEVEL:
Added an import statement to bring in the GLOBAL_LOG_LEVEL from open_webui.env.
+fromopen_webui.envimportGLOBAL_LOG_LEVEL
Modify uvicorn.run Parameters:
Updated the uvicorn.run function call to include the log_level parameter.
Set the log_level parameter to GLOBAL_LOG_LEVEL.lower() to match Uvicorn's expected log level formats (e.g., 'info', 'debug', 'warning', 'error', 'critical').
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/8041
**Author:** [@Adhithya03](https://github.com/Adhithya03)
**Created:** 12/24/2024
**Status:** ❌ Closed
**Base:** `main` ← **Head:** `main`
---
### 📝 Commits (2)
- [`16da847`](https://github.com/open-webui/open-webui/commit/16da8473422e6aff89a6af073d90bdf54c6e29e1) enh: add configurable log level for uvicorn server
- [`d52fc40`](https://github.com/open-webui/open-webui/commit/d52fc40038ddb8ee6c8c34f33b7c820f7ddf114d) format
### 📊 Changes
**1 file changed** (+3 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/__init__.py` (+3 -1)
</details>
### 📄 Description
Addresses #7859
This pull request introduces an enhancement that allows users to configure the log level of the Uvicorn server through the `GLOBAL_LOG_LEVEL` environment variable. By making the log level configurable, developers and users can adjust the verbosity of the server logs according to their needs.
**Changes Made:**
1. **Import `GLOBAL_LOG_LEVEL`:**
- Added an import statement to bring in the `GLOBAL_LOG_LEVEL` from `open_webui.env`.
```python
+ from open_webui.env import GLOBAL_LOG_LEVEL
```
2. **Modify `uvicorn.run` Parameters:**
- Updated the `uvicorn.run` function call to include the `log_level` parameter.
- Set the `log_level` parameter to `GLOBAL_LOG_LEVEL.lower()` to match Uvicorn's expected log level formats (e.g., 'info', 'debug', 'warning', 'error', 'critical').
```python
- uvicorn.run(open_webui.main.app, host=host, port=port, forwarded_allow_ips="*")
+ uvicorn.run(open_webui.main.app, host=host, port=port, forwarded_allow_ips="*", log_level=GLOBAL_LOG_LEVEL.lower())
```
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/8041
Author: @Adhithya03
Created: 12/24/2024
Status: ❌ Closed
Base:
main← Head:main📝 Commits (2)
16da847enh: add configurable log level for uvicorn serverd52fc40format📊 Changes
1 file changed (+3 additions, -1 deletions)
View changed files
📝
backend/open_webui/__init__.py(+3 -1)📄 Description
Addresses #7859
This pull request introduces an enhancement that allows users to configure the log level of the Uvicorn server through the
GLOBAL_LOG_LEVELenvironment variable. By making the log level configurable, developers and users can adjust the verbosity of the server logs according to their needs.Changes Made:
Import
GLOBAL_LOG_LEVEL:GLOBAL_LOG_LEVELfromopen_webui.env.Modify
uvicorn.runParameters:uvicorn.runfunction call to include thelog_levelparameter.log_levelparameter toGLOBAL_LOG_LEVEL.lower()to match Uvicorn's expected log level formats (e.g., 'info', 'debug', 'warning', 'error', 'critical').🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.