Skip to main content
This command is marked as unstable and may change in future releases.

Command: phala logs

Syntax

Description

Fetch logs from a CVM

Arguments

Options

Global Options

Examples

  • All container channels
  • Container stderr only
  • Container stdout, console, and stdin only
  • Follow container logs
  • CVM serial console
  • CVM stdout channel
  • CVM stderr channel
  • Last 100 lines
  • All available lines
  • Specify CVM

Notes

  • By default a container shows all channels: stdout, console, and stdin go to standard output, and stderr goes to standard error. --stdout and --stderr limit the output to one side. They cannot be used together, and they cannot be used with --serial, --cvm-stdout, or --cvm-stderr.
  • The container name can be the exact name or a unique prefix of the container ID.
  • -n, --tail takes an integer from 0 to 10000, or all.
  • --since, --until, and --timestamps work for container logs only. They are rejected with --serial, --cvm-stdout, and --cvm-stderr.
  • Errors from the log service print their code once, for example Error [ERR-17-009]: Docker responded .... See Fetch Logs over HTTP for the code list.
  • With -f, a container that has exited makes the stream end with no new output. The command counts such an end toward the stop only if the connection lasted less than 10 s. After 5 such ends in a row, it stops with log stream keeps ending without new output; the container may have stopped. A longer idle connection that ends reconnects without counting.
  • phala logs needs CLI 1.2.6 or later for the behavior above.