github.com/ojongerius/docker@v1.11.2/man/docker-logs.1.md (about)

     1  % DOCKER(1) Docker User Manuals
     2  % Docker Community
     3  % JUNE 2014
     4  # NAME
     5  docker-logs - Fetch the logs of a container
     6  
     7  # SYNOPSIS
     8  **docker logs**
     9  [**-f**|**--follow**]
    10  [**--help**]
    11  [**--since**[=*SINCE*]]
    12  [**-t**|**--timestamps**]
    13  [**--tail**[=*"all"*]]
    14  CONTAINER
    15  
    16  # DESCRIPTION
    17  The **docker logs** command batch-retrieves whatever logs are present for
    18  a container at the time of execution. This does not guarantee execution
    19  order when combined with a docker run (i.e., your run may not have generated
    20  any logs at the time you execute docker logs).
    21  
    22  The **docker logs --follow** command combines commands **docker logs** and
    23  **docker attach**. It will first return all logs from the beginning and
    24  then continue streaming new output from the container’s stdout and stderr.
    25  
    26  **Warning**: This command works only for the **json-file** or **journald**
    27  logging drivers.
    28  
    29  # OPTIONS
    30  **--help**
    31    Print usage statement
    32  
    33  **-f**, **--follow**=*true*|*false*
    34     Follow log output. The default is *false*.
    35  
    36  **--since**=""
    37     Show logs since timestamp
    38  
    39  **-t**, **--timestamps**=*true*|*false*
    40     Show timestamps. The default is *false*.
    41  
    42  **--tail**="*all*"
    43     Output the specified number of lines at the end of logs (defaults to all logs)
    44  
    45  The `--since` option can be Unix timestamps, date formatted timestamps, or Go
    46  duration strings (e.g. `10m`, `1h30m`) computed relative to the client machine’s
    47  time. Supported formats for date formatted time stamps include RFC3339Nano,
    48  RFC3339, `2006-01-02T15:04:05`, `2006-01-02T15:04:05.999999999`,
    49  `2006-01-02Z07:00`, and `2006-01-02`. The local timezone on the client will be
    50  used if you do not provide either a `Z` or a `+-00:00` timezone offset at the
    51  end of the timestamp.  When providing Unix timestamps enter
    52  seconds[.nanoseconds], where seconds is the number of seconds that have elapsed
    53  since January 1, 1970 (midnight UTC/GMT), not counting leap  seconds (aka Unix
    54  epoch or Unix time), and the optional .nanoseconds field is a fraction of a
    55  second no more than nine digits long. You can combine the `--since` option with
    56  either or both of the `--follow` or `--tail` options.
    57  
    58  # HISTORY
    59  April 2014, Originally compiled by William Henry (whenry at redhat dot com)
    60  based on docker.com source material and internal work.
    61  June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
    62  July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
    63  April 2015, updated by Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
    64  October 2015, updated by Mike Brown <mikebrow@gmail.com>