[Misc] update log level debug to warning when process port is used by (#24226)
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io> Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
This commit is contained in:
co-authored by
Cyrus Leung
parent
9fb74c27a7
commit
09e68bce34
@@ -95,7 +95,7 @@ async def serve_http(app: FastAPI,
|
|||||||
port = uvicorn_kwargs["port"]
|
port = uvicorn_kwargs["port"]
|
||||||
process = find_process_using_port(port)
|
process = find_process_using_port(port)
|
||||||
if process is not None:
|
if process is not None:
|
||||||
logger.debug(
|
logger.warning(
|
||||||
"port %s is used by process %s launched with command:\n%s",
|
"port %s is used by process %s launched with command:\n%s",
|
||||||
port, process, " ".join(process.cmdline()))
|
port, process, " ".join(process.cmdline()))
|
||||||
logger.info("Shutting down FastAPI HTTP server.")
|
logger.info("Shutting down FastAPI HTTP server.")
|
||||||
|
|||||||
Reference in New Issue
Block a user