- CORE_LOGGING_LEVEL=INFO #log level, critical, error, warning, notice, info, debug from high to low
Docker log view command:
docker logs -f -t --tail=100 c337e9df72a7
Refers to real-time viewing of the last 100 lines of logs with the container id c337e9df72a7
$ docker logs [OPTIONS] CONTAINER
Options:
--details Display more information
-f, --follow Track real-time logs
--since string Display logs since a certain timestamp, or relative time, such as 42m (ie 42 minutes)
--tail string How many lines of logs to display from the end of the log, the default is all
-t, --timestamps display timestamps
--until string display logs from a timestamp before, or relative time, such as 42m (ie 42 minutes)
View the logs after the specified time, only the last 100 lines are displayed:
$ docker logs -f -t --since="2018-02-08" --tail=100 CONTAINER_ID
1
View the logs of the last 30 minutes:
$ docker logs --since 30m CONTAINER_ID
1
View logs after a certain time:
$ docker logs -t --since="2018-02-08T13:23:37" CONTAINER_ID
1
View logs for a certain period of time:
$ docker logs -t --since="2018-02-08T13:23:37" --until "2018-02-09T12:23:37" CONTAINER_ID