Skip to main content
When a command in a sandbox fails or returns an unexpected result, start with its process output: the stdout, stderr, and exit status of that one command. Sandbox runtime logs collect the output of every process in the sandbox, along with the sandbox’s own activity, such as the requests its API server handles. Use them to see what happened across a time range. Image build logs record building or importing an image.

Inspect process output

Set up the Baseten CLI, then set SANDBOX_NAME to the sandbox’s name. To read a process’s output: Replace worker with the name used when starting the process, then run the following command to print its stdout and stderr:
To read stdout and stderr separately: Run the following command:
For more information, see baseten sandbox process logs and baseten sandbox process describe. For SDK examples, see Run commands in a sandbox.

Inspect sandbox logs

Runtime logs include each process’s stdout at info level and its stderr at error level. The CLI doesn’t read runtime logs; use the dashboard or the API.
To inspect a sandbox’s runtime logs:
  1. Sign in to your workspace at app.baseten.co and choose Sandboxes in the sidebar.
  2. Choose the sandbox.
  3. Choose Logs.
  4. To see earlier entries, choose Live, choose Custom, and select the time range that contains the operation.
  5. To narrow the entries, choose Level and select the levels to show.

Inspect image build logs

Inspect the build logs when building or importing an image returns FAILED.
To inspect image build logs:
  1. In Sandboxes, choose Images, then choose the image whose build failed.
  2. Choose Logs.
To compare errors with request traffic and resource usage, see sandbox metrics.