Hey folks, is there a way to silence these logs:
INFO: 192.168.65.1:35291 - "GET /healthz HTTP/1.1" 200 OKIf I'm googling correctly, I think these are coming from uvicorn so I tried following the docs and setting UVICORN_NO_ACCESS_LOG=true and UVICORN_LOG_LEVEL=warning but to no avail. Was hoping y'all might be able to point me in the right direction.
馃挕聽Hint: Mention RunLLM in the thread for followups.
馃挕聽Hint: Mention RunLLM in the thread for followups.
Hey stephen, those logs show calls to the Phoenix health check endpoint. It sounds like you're getting a lot of them. Not sure what log viewer you are using or if you are just streaming logs to stdout, but I believe many logging services offer the ability to filter out by keyword or route.
Yeah, we are running Phoenix in prod so /healthz gets hit frequently. We can filter them out at query time, but would prefer to not be paying our logging provider for them. Would you accept a PR to configure this via env var, similar to:
"""
The logging level ('debug', 'info', 'warning', 'error', 'critical') for the Phoenix backend. For
database logging see ENV_DB_LOGGING_LEVEL. Defaults to info.
"""
ENV_DB_LOGGING_LEVEL = "PHOENIX_DB_LOGGING_LEVEL"Yeah, we already have PHOENIX_LOGGING_LEVEL=WARNING set but these logs are coming from uvicorn afaict. This seems to silence them:
diff --git a/src/phoenix/server/main.py b/src/phoenix/server/main.py
index 1e219418..b31086a1 100644
--- a/src/phoenix/server/main.py
+++ b/src/phoenix/server/main.py
@@ -459,7 +459,9 @@ def main() -> None:
host=host, # type: ignore[arg-type]
port=port,
root_path=host_root_path,
+ access_log=False,
)
if tls_enabled_for_http:
assert tls_configGotchu. I'm going to add a environment variable called PHOENIX_ACCESS_LOG that you can set to false.
That'd be awesome, thanks!
https://github.com/encode/uvicorn/blob/master/uvicorn/config.py, line 392 access_log toggles the logger named uvicorn.access that writes a one-line record for every HTTP request. it is probably also worth to add an environment variable for Uvicorn's log_level which could be set to warning for example.
just adding an environment variable in case users do not want to see Uvicorn logs, as they can be expensive Stephen said Yeah, we are running Phoenix in prod so /healthz gets hit frequently. We can filter them out at query time, but would prefer to not be paying our logging provider for them
default is still logs enabled
