By default, the Cortex runtime logs all requests and responses. These logs appear in the app dashboard and are useful for debugging and monitoring. Disable them when privacy, security, or performance requires it.Documentation Index
Fetch the complete documentation index at: https://cerebrium.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Controlling Logs
Two settings control logging behavior in the Cortex runtime:DISABLE_REQUEST_LOGS- When enabled, prevents logging of incoming request dataDISABLE_RESPONSE_LOGS- When enabled, prevents logging of response data from your app
These settings only affect the default Cortex runtime. If you are using a
custom runtime, you will need to
handle logging behavior in your own server implementation.
Configuration
Configure these settings as secrets at either the app or project level:- Navigate to your project dashboard
- Go to the “Secrets” section
- Add one or both of the settings as a key with a value of
"true"to disable the corresponding logs
Setting the value to anything other than
true (or leaving it undefined) will
keep logging enabled, which is the default behavior.Use Cases
Common reasons to disable logs:- Processing sensitive data: If your app processes personal or sensitive information that shouldn’t be stored in logs
- Observability optimization: For high-throughput apps where logging adds unnecessary overhead making it difficult to monitor your app
Example
To disable both request and response logging, add the following secrets to your app:| Key | Value |
|---|---|
| DISABLE_REQUEST_LOGS | true |
| DISABLE_RESPONSE_LOGS | true |
Secrets are loaded on container startup. After updating a secret, restart the
app container for the change to take effect.