Description of problem: To debug container logs of multiple-container pod like kube-apiserver, a single `oc logs --all-containers pod_name > pod.log` is convenient, but it does not use marker for the beginning of each container log. This makes user hard to locate the beginning and ending for each container's logs in thousands of lines logs. Version-Release number of selected component (if applicable): latest oc got from `oc adm release extract --command oc registry.svc.ci.openshift.org/ocp/release:4.4.0-0.nightly-2020-03-18-102708` How reproducible: Always Steps to Reproduce: 1. oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/pods/pod_with_two_containers.json 2. $ oc logs doublecontainers -c hello-openshift Started, serving at 8080 $ oc logs doublecontainers -c hello-openshift-fedora serving on 8081 serving on 8888 $ oc logs doublecontainers --all-containers Started, serving at 8080 serving on 8081 serving on 8888 Actual results: 2. oc logs --all-containers does not use marker to mark the beginning for each container Expected results: 2. Should have some marker for easy view in situation of thousands of lines logs.
This should be already available with --prefix flag which should add pod and/or container name in front of the logs.
[root@dhcp-140-138 ~]# oc logs doublecontainers --all-containers --prefix=true [pod/doublecontainers/hello-openshift] Started, serving at 8080 [pod/doublecontainers/hello-openshift-fedora] serving on 8081 [pod/doublecontainers/hello-openshift-fedora] serving on 8888 [root@dhcp-140-138 ~]# oc version -o yaml clientVersion: buildDate: "2020-03-23T01:14:57Z" compiler: gc gitCommit: 2576e482bf003e34e67ba3d69edcf5d411cfd6f3 gitTreeState: clean gitVersion: 4.4.0-202003230106-2576e48 goVersion: go1.13.4 major: "" minor: "" platform: linux/amd64
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:0581