mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
fix
my dev environment works again!
This commit is contained in:
@@ -66,7 +66,7 @@ except Exception:
|
|||||||
####################################
|
####################################
|
||||||
|
|
||||||
GLOBAL_LOG_LEVEL = os.environ.get("GLOBAL_LOG_LEVEL", "").upper()
|
GLOBAL_LOG_LEVEL = os.environ.get("GLOBAL_LOG_LEVEL", "").upper()
|
||||||
if GLOBAL_LOG_LEVEL in logging.getLevelNamesMapping():
|
if GLOBAL_LOG_LEVEL in logging._levelToName:
|
||||||
logging.basicConfig(stream=sys.stdout, level=GLOBAL_LOG_LEVEL, force=True)
|
logging.basicConfig(stream=sys.stdout, level=GLOBAL_LOG_LEVEL, force=True)
|
||||||
else:
|
else:
|
||||||
GLOBAL_LOG_LEVEL = "INFO"
|
GLOBAL_LOG_LEVEL = "INFO"
|
||||||
@@ -99,7 +99,7 @@ SRC_LOG_LEVELS = {}
|
|||||||
for source in log_sources:
|
for source in log_sources:
|
||||||
log_env_var = source + "_LOG_LEVEL"
|
log_env_var = source + "_LOG_LEVEL"
|
||||||
SRC_LOG_LEVELS[source] = os.environ.get(log_env_var, "").upper()
|
SRC_LOG_LEVELS[source] = os.environ.get(log_env_var, "").upper()
|
||||||
if SRC_LOG_LEVELS[source] not in logging.getLevelNamesMapping():
|
if SRC_LOG_LEVELS[source] not in logging._levelToName:
|
||||||
SRC_LOG_LEVELS[source] = GLOBAL_LOG_LEVEL
|
SRC_LOG_LEVELS[source] = GLOBAL_LOG_LEVEL
|
||||||
log.info(f"{log_env_var}: {SRC_LOG_LEVELS[source]}")
|
log.info(f"{log_env_var}: {SRC_LOG_LEVELS[source]}")
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ import requests
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
from datetime import UTC, datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
import pytz
|
||||||
|
from pytz import UTC
|
||||||
from typing import Optional, Union, List, Dict
|
from typing import Optional, Union, List, Dict
|
||||||
|
|
||||||
from open_webui.models.users import Users
|
from open_webui.models.users import Users
|
||||||
|
|||||||
Reference in New Issue
Block a user