INNER CODE UNIT · Go
printLogsForContainers
openservicemesh/osm · ci/cmd/maestro.go:203
func printLogsForContainers(kubeClient kubernetes.Interface, pod v1.Pod) {
for _, containerObj := range pod.Spec.Containers {
initLogs := maestro.GetPodLogs(kubeClient, pod.Namespace, pod.Name, containerObj.Name, maestro.FailureLogsFromTimeSince)
switch containerObj.Name {
case constants.EnvoyContainerName:
fmt.Println(fmt.Sprintf("---- NS: %s Pod: %s Envoy Logs: --------\n",
pod.Namespace, pod.Name), initLogs)
default:
fmt.Println(fmt.Sprintf("---- NS: %s Pod: %s Container: %s --------\n",
pod.Namespace, pod.Name, containerObj.Name), cutIt(initLogs))
}
}
}