docker.container-logs

Collect the stdout/stderr logs from one or more docker containers. One of `container` or `container_list_options` is required.

docker.container-logs

type object

Collect the stdout/stderr logs from one or more docker containers. One of container or container_list_options is required.

collect:
  v1:
    - docker.container-logs:
        output_dir: /docker/cooltool/logs/www
        container_list_options:
          All: true
          Filters:
            name:
              - www
              - haproxy

Optional Parameters

  • container - A container name

  • container_list_options - Options to be used to filter the list of containers, as in The Docker API

  • container_logs_options - Args as would be given to docker logs, as in The Docker API

Outputs

  • {{.Name}}.stdout - The stdout logs. Will generate this file for each matched container

  • {{.Name}}.stderr - The stderr logs. Will generate this file for each matched container


Shared Parameters

This spec also inherits all of the required and optional Shared Parameters