2.2.5.2.2. 使用 OpenShift 客户端
执行
oc get pods并搜索具有Running状态的web-console条目,以确定 pod 名称。$ oc get pod sNAME READY STATUS RESTARTS AGE eap-builder-1-build 0/1 Completed 0 1d rhamt-postgresql-1-hfbdn 1/1 Running 0 1d rhamt-sso-1-build 0/1 Completed 0 1d rhamt-web-console-1-build 0/1 Completed 0 1d rhamt-web-console-1-vt7s5 1/1 Running 1 1d sso-1-wjl2n 1/1 Running 1 1d
在上面的示例中,这是
rhamt-web-console-1-vt7s5。使用
oc logs来检查当前的 pod 的日志。oc logs POD_NAME可以重定向输出来获取当前日志的副本。
oc logs POD_NAME > ./rhamt-openshift-POD_NAME.log