github.com/slene/docker@v1.8.0-rc1/docs/reference/commandline/logs.md (about)

     1  <!--[metadata]>
     2  +++
     3  title = "logs"
     4  description = "The logs command description and usage"
     5  keywords = ["logs, retrieve, docker"]
     6  [menu.main]
     7  parent = "smn_cli"
     8  weight=1
     9  +++
    10  <![end-metadata]-->
    11  
    12  # logs
    13  
    14      Usage: docker logs [OPTIONS] CONTAINER
    15  
    16      Fetch the logs of a container
    17  
    18        -f, --follow=false        Follow log output
    19        --since=""                Show logs since timestamp
    20        -t, --timestamps=false    Show timestamps
    21        --tail="all"              Number of lines to show from the end of the logs
    22  
    23  NOTE: this command is available only for containers with `json-file` logging
    24  driver.
    25  
    26  The `docker logs` command batch-retrieves logs present at the time of execution.
    27  
    28  The `docker logs --follow` command will continue streaming the new output from
    29  the container's `STDOUT` and `STDERR`.
    30  
    31  Passing a negative number or a non-integer to `--tail` is invalid and the
    32  value is set to `all` in that case.
    33  
    34  The `docker logs --timestamp` commands will add an RFC3339Nano
    35  timestamp, for example `2014-09-16T06:17:46.000000000Z`, to each
    36  log entry. To ensure that the timestamps for are aligned the
    37  nano-second part of the timestamp will be padded with zero when necessary.
    38  
    39  The `--since` option shows only the container logs generated after
    40  a given date. You can specify the date as an RFC 3339 date, a UNIX
    41  timestamp, or a Go duration string (e.g. `1m30s`, `3h`). Docker computes
    42  the date relative to the client machine’s time. You can combine
    43  the `--since` option with either or both of the `--follow` or `--tail` options.