provision/docker/handlers.go
func logsConfigGetHandler(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	pools, err := permission.ListContextValues(t, permission.PermPoolUpdateLogs, true)
	if err != nil {
		return err
	}
	configEntries, err := container.LogLoadAll()
	if err != nil {
		return err
	}
	w.Header().Set("Content-Type", "application/json")
	if len(pools) == 0 {
		return json.NewEncoder(w).Encode(configEntries)
	}
	newMap := map[string]container.DockerLogConfig{}
	for _, p := range pools {
		if entry, ok := configEntries[p]; ok {
			newMap[p] = entry
		}
	}
	return json.NewEncoder(w).Encode(newMap)
}
func logsConfigGetHandler(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	pools, err := permission.ListContextValues(t, permission.PermPoolUpdateLogs, true)
	if err != nil {
		return err
	}
	configEntries, err := container.LogLoadAll()
	if err != nil {
		return err
	}
	w.Header().Set("Content-Type", "application/json")
	if len(pools) == 0 {
		return json.NewEncoder(w).Encode(configEntries)
	}
	newMap := map[string]container.DockerLogConfig{}
	for _, p := range pools {
		if entry, ok := configEntries[p]; ok {
			newMap[p] = entry
		}
	}
	return json.NewEncoder(w).Encode(newMap)
}
// title: logs config
// path: /docker/logs
// method: GET
// produce: application/json
// responses:
//   200: Ok
//   401: Unauthorized