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.
Setting UVICORN_NO_ACCESS_LOG=true and UVICORN_LOG_LEVEL=warning are not recognized by Uvicorn as valid environment variables for disabling access logs or changing log level. Instead, you should use the --no-access-log CLI flag to disable access logs, or set the log level using the --log-level flag (e.g., --log-level warning) when starting Uvicorn. These options are documented in the Uvicorn logging settings.If you are running Phoenix, you may need to adjust how the server is started to pass these flags, as environment variables alone will not have the desired effect. There is no mention in the Phoenix or Uvicorn docs of environment variables like UVICORN_NO_ACCESS_LOG or UVICORN_LOG_LEVEL being supported for this purpose.Would you like more detail on how to pass these flags in your specific deployment setup?Sources:
- Uvicorn logging settings
馃挕聽Hint: Mention RunLLM in the thread for followups.
According to the Uvicorn logging settings, Uvicorn does not support environment variables like UVICORN_NO_ACCESS_LOG or UVICORN_LOG_LEVEL for controlling access logs or log level. Instead, you must use CLI flags such as --no-access-log and --log-level warning when starting the server.Would you like more detail on how to use these flags in your workflow?Sources:
- Uvicorn logging settings
馃挕聽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
