Controlling Request Logging
Using HTTP Headers
To enable logging for a specific request, include theX-TFY-LOGGING-CONFIG header:
Using Environment Variables
Environment variable configuration is only available when running a self-hosted instance of TrueFoundry AI Gateway
REQUEST_LOGGING_MODE environment variable in the AI Gateway:
| Mode | Description |
|---|---|
HEADER_CONTROLLED | Logging depends on the enabled value in the X-TFY-LOGGING-CONFIG header. If the header is absent or set to true, logging will occur. If set to false, no logging will happen. |
ALWAYS | All requests are logged regardless of the enabled value. |
NEVER | No requests are logged regardless of the enabled value. |
Viewing Request Logs
You can view all logged requests in the TrueFoundry UI. Go toAI Gateway > Monitor > Requests
