소스 검색

Merge pull request #8053 from Adhithya03/main

enh: add configurable log level for uvicorn server
Timothy Jaeryang Baek 7 달 전
부모
커밋
91429640ff
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      backend/open_webui/__init__.py

+ 3 - 1
backend/open_webui/__init__.py

@@ -6,6 +6,8 @@ from pathlib import Path
 import typer
 import uvicorn
 
+from open_webui.env import (GLOBAL_LOG_LEVEL)
+
 app = typer.Typer()
 
 KEY_FILE = Path.cwd() / ".webui_secret_key"
@@ -55,7 +57,7 @@ def serve(
 
     import open_webui.main  # we need set environment variables before importing main
 
-    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())
 
 
 @app.command()