Files
docker-docs/data/sandbox-cli/docker_sandbox_network_log.yaml
David Karlsson 66ff3c700c update sandbox cli ref (#24042)
- **sandboxes: regenerate, vendor cli reference docs**
- **chore: move `docker sandbox create` to a section page**

---------

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2026-01-30 12:53:35 +01:00

126 lines
3.1 KiB
YAML

command: docker sandbox network log
short: Show network logs
long: Show network logs
usage: docker sandbox network log
pname: docker sandbox network
plink: docker_sandbox_network.yaml
options:
- option: json
value_type: bool
default_value: "false"
description: Output in JSON format
details_url: '#json'
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: limit
value_type: int
default_value: "0"
description: Maximum number of log entries to show
details_url: '#limit'
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: quiet
shorthand: q
value_type: bool
default_value: "false"
description: Only display log entries
details_url: '#quiet'
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
inherited_options:
- option: debug
shorthand: D
value_type: bool
default_value: "false"
description: Enable debug logging
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: socket
value_type: string
description: |
Connect to daemon at specific socket path (for development/debugging)
deprecated: false
hidden: true
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
examples: |-
### Show network logs
```console
$ docker sandbox network log
2026-01-29T10:15:23Z sandbox=my-sandbox request GET https://api.example.com/data allowed
2026-01-29T10:15:24Z sandbox=my-sandbox request POST https://api.example.com/submit allowed
2026-01-29T10:15:25Z sandbox=my-sandbox request GET https://blocked.example.com/ denied
```
### Show only log entries (--quiet) {#quiet}
```text
--quiet
```
Suppress headers and only show log entries:
```console
$ docker sandbox network log --quiet
2026-01-29T10:15:23Z sandbox=my-sandbox request GET https://api.example.com/data allowed
2026-01-29T10:15:24Z sandbox=my-sandbox request POST https://api.example.com/submit allowed
```
### Limit number of entries (--limit) {#limit}
```text
--limit N
```
Show only the last N log entries:
```console
$ docker sandbox network log --limit 10
```
### JSON output (--json) {#json}
Output logs in JSON format for parsing:
```console
$ docker sandbox network log --json
{
"entries": [
{
"timestamp": "2026-01-29T10:15:23Z",
"sandbox": "my-sandbox",
"type": "request",
"method": "GET",
"url": "https://api.example.com/data",
"action": "allowed"
}
]
}
```
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false