Merge pull request #10568 from LK4D4/logging_drivers

Logging drivers
This commit is contained in:
Arnaud Porterie
2015-03-17 09:45:58 -07:00
23 changed files with 615 additions and 50 deletions
@@ -161,7 +161,8 @@ Create a container
"RestartPolicy": { "Name": "", "MaximumRetryCount": 0 },
"NetworkMode": "bridge",
"Devices": [],
"Ulimits": [{}]
"Ulimits": [{}],
"LogConfig": { "Type": "json-file", Config: {} }
}
}
@@ -255,6 +256,10 @@ Json Parameters:
- **Ulimits** - A list of ulimits to be set in the container, specified as
`{ "Name": <name>, "Soft": <soft limit>, "Hard": <hard limit> }`, for example:
`Ulimits: { "Name": "nofile", "Soft": 1024, "Hard", 2048 }}`
- **LogConfig** - Logging configuration to container, format
`{ "Type": "<driver_name>", "Config": {"key1": "val1"}}
Available types: `json-file`, `none`.
`json-file` logging driver.
Query Parameters:
@@ -352,6 +357,7 @@ Return low-level information on the container `id`
"MaximumRetryCount": 2,
"Name": "on-failure"
},
"LogConfig": { "Type": "json-file", Config: {} },
"SecurityOpt": null,
"VolumesFrom": null,
"Ulimits": [{}]
@@ -448,6 +454,9 @@ Status Codes:
Get stdout and stderr logs from the container ``id``
> **Note**:
> This endpoint works only for containers with `json-file` logging driver.
**Example request**:
GET /containers/4fa6e0f0c678/logs?stderr=1&stdout=1&timestamps=1&follow=1&tail=10 HTTP/1.1