getContainerLogPath returns the container log path specified by kubelet and the real path where docker stores the container log.
(containerID string)
| 151 | // getContainerLogPath returns the container log path specified by kubelet and the real |
| 152 | // path where docker stores the container log. |
| 153 | func (ds *dockerService) getContainerLogPath(containerID string) (string, string, error) { |
| 154 | info, err := ds.client.InspectContainer(containerID) |
| 155 | if err != nil { |
| 156 | return "", "", fmt.Errorf("failed to inspect container %q: %v", containerID, err) |
| 157 | } |
| 158 | return info.Config.Labels[containerLogPathLabelKey], info.LogPath, nil |
| 159 | } |
| 160 | |
| 161 | // createContainerLogSymlink creates the symlink for docker container log. |
| 162 | func (ds *dockerService) createContainerLogSymlink(containerID string) error { |
no test coverage detected