Logging: Fix Uvicorn hook
The Uvicorn logging config wasn't being set. Fix that when creating a new server. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
2295b12643
commit
4d09226364
2 changed files with 3 additions and 4 deletions
|
|
@ -80,9 +80,7 @@ UVICORN_LOG_CONFIG = {
|
|||
"disable_existing_loggers": False,
|
||||
"handlers": {
|
||||
"uvicorn": {
|
||||
"class": (
|
||||
f"{UvicornLoggingHandler.__module__}.{UvicornLoggingHandler.__qualname__}",
|
||||
)
|
||||
"class": f"{UvicornLoggingHandler.__module__}.{UvicornLoggingHandler.__qualname__}", # noqa
|
||||
},
|
||||
},
|
||||
"root": {"handlers": ["uvicorn"], "propagate": False, "level": "TRACE"},
|
||||
|
|
|
|||
3
main.py
3
main.py
|
|
@ -17,7 +17,7 @@ from fastapi.responses import StreamingResponse
|
|||
from functools import partial
|
||||
from loguru import logger
|
||||
|
||||
from common.logger import setup_logger, get_loading_progress_bar
|
||||
from common.logger import UVICORN_LOG_CONFIG, setup_logger, get_loading_progress_bar
|
||||
import common.gen_logging as gen_logging
|
||||
from backends.exllamav2.model import ExllamaV2Container
|
||||
from backends.exllamav2.utils import check_exllama_version
|
||||
|
|
@ -677,6 +677,7 @@ def start_api(host: str, port: int):
|
|||
app,
|
||||
host=host,
|
||||
port=port,
|
||||
log_config=UVICORN_LOG_CONFIG,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue