log
發表於 : 2017-07-03 11:39:45
By default docker uses the json-file driver to record your containers logs and the raw json output of the logs can be found in:
/var/lib/docker/containers/[container-id]/[container-id]-json.log
You can get this location by running:
When you run docker-compose logs [service-name], docker-compose will attach to the service (container) you reference and the LogPrinter object will output the contents of the above file, but formatted so they're easier to read.
Related docs: https://docs.docker.com/compose/compose-file/#logging
/var/lib/docker/containers/[container-id]/[container-id]-json.log
You can get this location by running:
代碼: 選擇全部
docker inspect --format='{{.LogPath}}' [container-id or container-name]
Related docs: https://docs.docker.com/compose/compose-file/#logging