소스 검색

refac: use logging instead of print

Thomas Rehn 3 달 전
부모
커밋
81af20aa9b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      backend/open_webui/utils/tools.py

+ 1 - 1
backend/open_webui/utils/tools.py

@@ -407,7 +407,7 @@ async def get_tool_server_data(token: str, url: str) -> Dict[str, Any]:
                 else:
                 else:
                     res = await response.json()
                     res = await response.json()
     except Exception as err:
     except Exception as err:
-        print("Error:", err)
+        log.exception(f"Could not fetch tool server spec from {url}")
         if isinstance(err, dict) and "detail" in err:
         if isinstance(err, dict) and "detail" in err:
             error = err["detail"]
             error = err["detail"]
         else:
         else: