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.
- 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, rather than being scoped at the container group level, is scoped at the organization level, allowing you to view and aggregate 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_log
ORjson_log
, but not both. If you emit logs that are valid json, they will end up in thejson_log
field. Otherwise, the full log line will be in thetext_log
field. - The
time
field indicates the system time on the node where the log was emitted. - the
receive_time
field 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
query
parameter in the body of the request to the API.