Logs
With the CLI of the SDK, you can access the execution logs of all your deployed services.
Get the list of deployments
Then to get the list of all deployments let's use this command:
npx warp deployment list
The command will dump you something like that:
Get logs of a deployment
You can fetch the logs in two different ways, one being with the name of the deployment you can find with the list command above, or via an interactive prompt:
npx warp deployment logs deployment-2021-08-06T14:46:04.890Z
npx warp deployment logs
The result will give you something like that (interactive prompt mode, but the end result will be the same):
You can display the level of logs using the --level <level>
where <level>
can be:
build
for build logsstdout
for stdout logs of the containerstderr
for stderr logs of the containersystem
, for logs related to scaledynamics platform like (container start, or container stop)access
, for logs related to HTTP requests
By default, the command dumps 'access/stdout/stdin/system' levels. To access build logs you have to add --level build
To get realtime update of logs
To fetch the server logs and follow in realtime, use the previous commands with --follow
flag :
npx warp deployment logs --follow deployment-2021-08-06T14:46:04.890Z