# Logs and shell

Source: https://docs.myhub.host/logs

## Check recent output

```sh
hub app my-app logs
```

The command prints recent output and exits. During a build, it shows the build log.

## Watch a running app

```sh
hub app my-app logs --follow
```

Reproduce the problem while watching. Press Ctrl-C to stop.

## Investigate a failed deployment

```sh
hub app my-app logs --build
```

Read the error, fix the source, and deploy again. Build logs stay with releases; runtime logs may reset when services are replaced.

## Open a shell

```sh
hub app my-app shell
```

Use Ctrl-D to exit. Shell access requires the member role or higher.

[Log options](https://docs.myhub.host/cli/app/logs) · [Run one command](https://docs.myhub.host/cli/app/exec) · [Scripted checks](https://docs.myhub.host/automation)