Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI:DOCS] Man pages: refactor common options: log-related options #15470

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/source/markdown/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ podman-kill.1.md
podman-kube-play.1.md
podman-login.1.md
podman-logout.1.md
podman-logs.1.md
podman-manifest-add.1.md
podman-manifest-push.1.md
podman-pause.1.md
podman-pod-clone.1.md
podman-pod-create.1.md
podman-pod-logs.1.md
podman-pod-rm.1.md
podman-pod-start.1.md
podman-pod-stop.1.md
Expand Down
3 changes: 3 additions & 0 deletions docs/source/markdown/options/color.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#### **--color**

Output the containers with different colors in the log.
7 changes: 7 additions & 0 deletions docs/source/markdown/options/follow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#### **--follow**, **-f**

Follow log output. Default is false.

Note: If you are following a <<container|pod>> which is removed by `podman <<container|pod>> rm`
or removed on exit (`podman run --rm ...`), then there is a chance that the log
file will be removed before `podman<< pod|>> logs` reads the final content.
3 changes: 3 additions & 0 deletions docs/source/markdown/options/names.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#### **--names**, **-n**

Output the container names instead of the container IDs in the log.
6 changes: 6 additions & 0 deletions docs/source/markdown/options/since.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#### **--since**=*TIMESTAMP*

Show logs since TIMESTAMP. The --since option can be Unix timestamps, date formatted timestamps, or Go duration
strings (e.g. 10m, 1h30m) computed relative to the client machine's time. Supported formats for date formatted
time stamps include RFC3339Nano, RFC3339, 2006-01-02T15:04:05, 2006-01-02T15:04:05.999999999, 2006-01-02Z07:00,
and 2006-01-02.
4 changes: 4 additions & 0 deletions docs/source/markdown/options/tail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#### **--tail**=*LINES*

Output the specified number of LINES at the end of the logs. LINES must be an integer. Defaults to -1,
which prints all lines
3 changes: 3 additions & 0 deletions docs/source/markdown/options/timestamps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#### **--timestamps**, **-t**

Show timestamps in the log outputs. The default is false
6 changes: 6 additions & 0 deletions docs/source/markdown/options/until.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#### **--until**=*TIMESTAMP*

Show logs until TIMESTAMP. The --until option can be Unix timestamps, date formatted timestamps, or Go duration
strings (e.g. 10m, 1h30m) computed relative to the client machine's time. Supported formats for date formatted
time stamps include RFC3339Nano, RFC3339, 2006-01-02T15:04:05, 2006-01-02T15:04:05.999999999, 2006-01-02Z07:00,
and 2006-01-02.
Original file line number Diff line number Diff line change
Expand Up @@ -15,49 +15,24 @@ any logs at the time you execute podman logs).

## OPTIONS

#### **--color**
@@option color

Output the containers with different colors in the log.

#### **--follow**, **-f**

Follow log output. Default is false.

Note: If you are following a container which is removed `podman container rm`
or removed on exit `podman run --rm ...`, then there is a chance that the log
file will be removed before `podman logs` reads the final content.
@@option follow

#### **--latest**, **-l**

Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)

#### **--names**, **-n**

Output the container name in the log

#### **--since**=*TIMESTAMP*

Show logs since TIMESTAMP. The --since option can be Unix timestamps, date formatted timestamps, or Go duration
strings (e.g. 10m, 1h30m) computed relative to the client machine's time. Supported formats for date formatted
time stamps include RFC3339Nano, RFC3339, 2006-01-02T15:04:05, 2006-01-02T15:04:05.999999999, 2006-01-02Z07:00,
and 2006-01-02.

#### **--tail**=*LINES*

Output the specified number of LINES at the end of the logs. LINES must be an integer. Defaults to -1,
which prints all lines
@@option names

#### **--timestamps**, **-t**
@@option since

Show timestamps in the log outputs. The default is false
@@option tail

#### **--until**=*TIMESTAMP*
@@option timestamps

Show logs until TIMESTAMP. The --until option can be Unix timestamps, date formatted timestamps, or Go duration
strings (e.g. 10m, 1h30m) computed relative to the client machine's time. Supported formats for date formatted
time stamps include RFC3339Nano, RFC3339, 2006-01-02T15:04:05, 2006-01-02T15:04:05.999999999, 2006-01-02Z07:00,
and 2006-01-02.
@@option until

## EXAMPLE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,51 +13,27 @@ Note: Long running command of `podman pod log` with a `-f` or `--follow` needs t

## OPTIONS

#### **--color**

Output the containers with different colors in the log.
@@option color

#### **--container**, **-c**

By default `podman pod logs` retrieves logs for all the containers available within the pod differentiate by field `container`. However there are use-cases where user would want to limit the log stream only to a particular container of a pod for such cases `-c` can be used like `podman pod logs -c ctrNameorID podname`.

#### **--follow**, **-f**

Follow log output. Default is false.

Note: If you are following a pod which is removed `podman pod rm`, then there is a
chance that the log file will be removed before `podman pod logs` reads the final content.
@@option follow

#### **--latest**, **-l**

Instead of providing the pod name or id, get logs of the last created pod. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)

#### **--names**, **-n**

Output the container names instead of the container IDs in the log.

#### **--since**=*TIMESTAMP*

Show logs since TIMESTAMP. The --since option can be Unix timestamps, date formatted timestamps, or Go duration
strings (e.g. 10m, 1h30m) computed relative to the client machine's time. Supported formats for date formatted
time stamps include RFC3339Nano, RFC3339, 2006-01-02T15:04:05, 2006-01-02T15:04:05.999999999, 2006-01-02Z07:00,
and 2006-01-02.

#### **--tail**=*LINES*

Output the specified number of LINES at the end of the logs. LINES must be an integer. Defaults to -1,
which prints all lines
@@option names

#### **--timestamps**, **-t**
@@option since

Show timestamps in the log outputs. The default is false
@@option tail

#### **--until**=*TIMESTAMP*
@@option timestamps

Show logs until TIMESTAMP. The --until option can be Unix timestamps, date formatted timestamps, or Go duration
strings (e.g. 10m, 1h30m) computed relative to the client machine's time. Supported formats for date formatted
time stamps include RFC3339Nano, RFC3339, 2006-01-02T15:04:05, 2006-01-02T15:04:05.999999999, 2006-01-02Z07:00,
and 2006-01-02.
@@option until

## EXAMPLE

Expand Down