How to use docker logs
Editor to share with you how to use docker logs, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
$docker logs-- helpUsage: docker logs [OPTIONS] CONTAINERFetch the logs of a container-f,-- follow Follow log output-- help Print usage-- since Show logs since timestamp-t,-- timestamps Show timestamps-- tail=all Number of lines to show from the end of the logs
For example:
Docker logs-f-t-since= "2017-05-31"-- tail=100 container_name
-- since: this parameter specifies the start date of the output log, that is, only logs after the specified date are output.
-f: view real-time logs
-t: view the date on which the log was generated
-tail=100: view the last 100 logs.
Container_name: container name or ID of the container is also fine
The above is all the contents of this article "how to use docker logs". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!