How to Log From Your Container
When running a container on SaladCloud, you can log to the standard output and standard error streams. These logs are collected and stored by SaladCloud, and exported to any configured external logging source. Learn more about logging best practices.Basic Logging
How to View Container Logs In the Portal
Once your container is up and running on a SaladCloud node, you can view the logs from your container on the “Container Logs” tab of a Container Group. To access this feature in the portal, navigate to your Container Group details page, and click on the ‘Container Logs’ tab.

- search for specific log messages with case-insensitive string filtering
- filter for logs from a specific Machine ID. If left blank, logs from all Machine IDs in the Container Group will be returned.
- filter for logs in a specified time period. Choose one of the predefined options, or use the custom start date and end date option
- Log Message
- Machine ID (The unique ID of the node running the container that created the log message.)
- Log Create Time
- A maximum of 500 logs can be returned per query. Utilize specific query filters and time ranges to get the logs you are looking for.
- Logs are retained and accessible for up to 90 days.
- Each query counts against your daily log query limits.
- If you encounter this error message, try narrowing your query’s time range
-
Advanced Logging
For more advanced on-platform logging capabilities, you can make use of the Query Log Entries endpoint in the API. This endpoint is scoped at the organization level, rather than the container group level, allowing you to view logs from any number of container groups and projects. This endpoint supports a more flexible query language as well, allowing you to make much more sophisticated filters across many fields, and supporting filters on structured logs emitted by your application. See the full query reference. You can query logs by making a POST request to the query logs endpoint like this:- Note that this will contain EITHER
text_logORjson_log, but not both. If you emit logs that are valid json, they will end up in thejson_logfield. Otherwise, the full log line will be in thetext_logfield. - The
timefield indicates the system time on the node where the log was emitted. - the
receive_timefield indicates the time when Axiom (what we use under the hood for log storage) received the log entry. - Any of these fields can be used in the query language.
Here are some examples of queries you can
make. These queries can be passed as the
queryparameter in the body of the request to the API.
Daily Log Query Limits
SaladCloud limits how many log queries you can run each day. There are two limits, one per organization and one per account, and both apply to every query. Every log query counts, whether it comes from the Portal, the API, or the SaladCloud CLI. The limits reset at 00:00 UTC. They only limit reading logs through SaladCloud: your containers keep running and logging as normal.When You Reach a Limit
Log queries return429 Too Many Requests until 00:00 UTC, and the Portal shows a “Daily log query limit reached”
banner. You can:
- Wait for the reset.
- Use fewer queries.
- Stream your logs to your own logging service with external logging. Logs go straight to your provider as they’re written, with no SaladCloud query limit. This is the best option if you need logs continuously or in high volume.
- Contact support if you need a higher limit.
Use Fewer Queries
- Get more from each query. Query Log Entries searches your whole organization, so one query can cover several
container groups or instances. Combine them with
orinstead of running a separate query for each one, and setpage_sizeto 100, the maximum, so you need fewer pages. - Don’t query in a tight loop. Polling once a minute uses 1,440 queries a day. Polling every 5 minutes uses 288.
- When you poll, ask only for what’s new. Set
start_timeto the time of the last entry you already have, or a few minutes back. Re-reading the last day or week on every poll is slower and returns entries you already have. - Check instance status without logs. To see whether instances are running or ready, use List Container Group Instances. It isn’t a log query.
- Log only what you need. Less output makes log queries faster and means fewer pages to read.
Watch Out For Automatic Polling
These keep running queries until you stop them, and use up the limit fastest:- Portal auto-refresh runs the query every 10 seconds. Turn it off or close the tab when you aren’t watching.
logs -fin the CLI runs at least one query every 5 seconds by default, and more for a container that logs a lot. Stop it when you’re done, or set a longer--poll-interval.- Scripts and AI agents that poll logs in a loop. Poll every few minutes at most, or use external logging instead.
