> ## Documentation Index
> Fetch the complete documentation index at: https://docs.idyl.network/llms.txt
> Use this file to discover all available pages before exploring further.

# idyl logs

> Show logs from a workload container

Show logs from a container of a running pod or sandbox.

The target is addressed as pod/\<name> or sandbox/\<name>. With no --tail,
\--since, or --follow, the command prints all currently available logs and
exits. Use --follow to keep the stream open until interrupted.

## Usage

```bash theme={null}
idyl logs pod/name|sandbox/name [flags]
```

## Flags

| Flag                   | Description                                                    |
| ---------------------- | -------------------------------------------------------------- |
| `--container <string>` | Container name.                                                |
| `-f, --follow`         | Stream new log lines as they arrive.                           |
| `--previous`           | Read logs from the previous container instance when available. |
| `--since <duration>`   | Only return logs newer than this duration. Default: `0s`.      |
| `--stream <string>`    | Log stream selector: all, stdout, or stderr. Default: `all`.   |
| `--tail <int64>`       | Number of recent log lines to show. Default: `0`.              |
| `--timestamps`         | Include provider timestamps when available.                    |

## Inherited flags

| Flag                                 | Description                                                        |
| ------------------------------------ | ------------------------------------------------------------------ |
| `-a <string>, --account-id <string>` | Account ID to use, overriding the current context.                 |
| `-c <string>, --context <string>`    | Use the named context for this command.                            |
| `--homedir <string>`                 | Override the configuration directory. Defaults to \~/.config/idyl. |
| `-n <string>, --namespace <string>`  | Namespace to use for this command.                                 |
| `-o <string>, --output <string>`     | Output format (json\|yaml).                                        |
| `-p <string>, --profile <string>`    | Override the access profile for this command.                      |
| `--realm <string>`                   | Override the realm for this command.                               |
| `--subnet <string>`                  | Override the context subnet for this command.                      |

## Examples

```bash theme={null}
# Print all available logs
idyl logs pod/web

# Stream logs continuously
idyl logs pod/web --follow

# Show the last 100 lines from stderr
idyl logs pod/web --tail 100 --stream stderr
```
