MCPcopy Create free account
hub / github.com/Mirantis/cri-dockerd / getContainerLogPath

Method getContainerLogPath

core/logs.go:153–159  ·  view source on GitHub ↗

getContainerLogPath returns the container log path specified by kubelet and the real path where docker stores the container log.

(containerID string)

Source from the content-addressed store, hash-verified

151// getContainerLogPath returns the container log path specified by kubelet and the real
152// path where docker stores the container log.
153func (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.
162func (ds *dockerService) createContainerLogSymlink(containerID string) error {

Callers 2

Calls 1

InspectContainerMethod · 0.65

Tested by

no test coverage detected