github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/docs/source/markdown/podman-pod-logs.1.md (about)

     1  % podman-pod-logs(1)
     2  
     3  ## NAME
     4  podman\-pod\-logs - Displays logs for pod with one or more containers
     5  
     6  ## SYNOPSIS
     7  **podman pod logs** [*options*] *pod*
     8  
     9  ## DESCRIPTION
    10  The podman pod logs command batch-retrieves whatever logs are present with all the containers of a pod. Pod logs can be filtered by container name or id using flag **-c** or **--container** if needed.
    11  
    12  Note: Long running command of `podman pod log` with a `-f` or `--follow` needs to be reinvoked if new container is added to the pod dynamically otherwise logs of newly added containers would not be visible in log stream.
    13  
    14  ## OPTIONS
    15  
    16  #### **--color**
    17  
    18  Output the containers with different colors in the log.
    19  
    20  #### **--container**, **-c**
    21  
    22  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`.
    23  
    24  #### **--follow**, **-f**
    25  
    26  Follow log output.  Default is false.
    27  
    28  Note: If you are following a pod which is removed `podman pod rm`, then there is a
    29  chance that the log file will be removed before `podman pod logs` reads the final content.
    30  
    31  #### **--latest**, **-l**
    32  
    33  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)
    34  
    35  #### **--names**, **-n**
    36  
    37  Output the container names instead of the container IDs in the log.
    38  
    39  #### **--since**=*TIMESTAMP*
    40  
    41  Show logs since TIMESTAMP. The --since option can be Unix timestamps, date formatted timestamps, or Go duration
    42  strings (e.g. 10m, 1h30m) computed relative to the client machine's time. Supported formats for date formatted
    43  time stamps include RFC3339Nano, RFC3339, 2006-01-02T15:04:05, 2006-01-02T15:04:05.999999999, 2006-01-02Z07:00,
    44  and 2006-01-02.
    45  
    46  #### **--tail**=*LINES*
    47  
    48  Output the specified number of LINES at the end of the logs.  LINES must be an integer.  Defaults to -1,
    49  which prints all lines
    50  
    51  #### **--timestamps**, **-t**
    52  
    53  Show timestamps in the log outputs.  The default is false
    54  
    55  #### **--until**=*TIMESTAMP*
    56  
    57  Show logs until TIMESTAMP. The --until option can be Unix timestamps, date formatted timestamps, or Go duration
    58  strings (e.g. 10m, 1h30m) computed relative to the client machine's time. Supported formats for date formatted
    59  time stamps include RFC3339Nano, RFC3339, 2006-01-02T15:04:05, 2006-01-02T15:04:05.999999999, 2006-01-02Z07:00,
    60  and 2006-01-02.
    61  
    62  ## EXAMPLE
    63  
    64  To view a pod's logs:
    65  ```
    66  podman pod logs -t podIdorName
    67  ```
    68  
    69  To view logs of a specific container on the pod
    70  ```
    71  podman pod logs -c ctrIdOrName podIdOrName
    72  ```
    73  
    74  To view all pod logs:
    75  ```
    76  podman pod logs -t --since 0 myserver-pod-1
    77  ```
    78  
    79  To view a pod's logs since a certain time:
    80  ```
    81  podman pod logs -t --since 2017-08-07T10:10:09.055837383-04:00 myserver-pod-1
    82  ```
    83  
    84  To view a pod's logs generated in the last 10 minutes:
    85  ```
    86  podman pod logs --since 10m myserver-pod-1
    87  ```
    88  
    89  To view a pod's logs until 30 minutes ago:
    90  ```
    91  podman pod logs --until 30m myserver-pod-1
    92  ```
    93  
    94  ## SEE ALSO
    95  **[podman(1)](podman.1.md)**, **[podman-pod(1)](podman-pod.1.md)**, **[podman-pod-rm(1)](podman-pod-rm.1.md)**, **[podman-logs(1)](podman-logs.1.md)**