Editing Docker logging
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | Docker support logging to format or different platforms, such as | + | Docker support logging to format or different platforms, such as, json-file, syslog, journald, gelf, fluentd, awslogs, splunk, etwlogs, gcplogs and logentries.<ref>https://docs.docker.com/config/containers/logging/configure/</ref> |
− | + | * Configuration is done at docker container start time with command <code>docker run -it --log-drive LOG_METHOD CONTAINER_ID</code> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Configuration is done at docker container start time with command <code>docker run -it --log-drive LOG_METHOD CONTAINER_ID</code> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* Check method configured in a running container: | * Check method configured in a running container: | ||
− | < | + | ** <code>docker inspect -f '{{.HostConfig.LogConfig.Type}}' CONTAINER_ID</code> |
− | docker inspect -f '{{.HostConfig.LogConfig.Type}}' CONTAINER_ID | + | ** <code>docker inspect -f '{{.HostConfig.LogConfig}}' CONTAINER_ID</code> |
− | docker inspect -f '{{.HostConfig.LogConfig}}' CONTAINER_ID | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | </ | ||
* View [[logs]] | * View [[logs]] | ||
:<code>[[docker logs]] CONTAINER_NAME_OR_ID</code> (Docker Community Engine only support: local, json-file and [[journald]]) | :<code>[[docker logs]] CONTAINER_NAME_OR_ID</code> (Docker Community Engine only support: local, json-file and [[journald]]) | ||
Line 38: | Line 9: | ||
:See https://docs.docker.com/config/containers/logging/ for more information | :See https://docs.docker.com/config/containers/logging/ for more information | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == | ||
− | |||
* {{Docker}} | * {{Docker}} | ||
− | |||
− | |||
− | |||
− | |||
− |
Advertising: