Este contenido no está disponible en el idioma seleccionado.
Chapter 8. Viewing CodeReady Workspaces operation logs
After the CodeReady Workspaces pods are created, you can view the operation logs of the application in the terminal or through the OpenShift console.
8.1. Viewing CodeReady Workspaces operation logs in the terminal Copiar enlaceEnlace copiado en el portapapeles!
To view the operation logs on the terminal, run the following commands:
To obtain the names of the pods you must switch to project where CodeReady Workspaces is installed:
oc get pods -n=<OpenShift-project-name>
$ oc get pods -n=<OpenShift-project-name>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This command shows the pods that have been created:
NAME READY STATUS RESTARTS AGE codeready-6b4876f56c-qdlll 1/1 Running 0 24m codeready-operator-56bc9599cc-pkqkn 1/1 Running 0 25m keycloak-666c5f9f4b-zz88z 1/1 Running 0 24m postgres-96875bcbd-tfxr4 1/1 Running 0 25m
NAME READY STATUS RESTARTS AGE codeready-6b4876f56c-qdlll 1/1 Running 0 24m codeready-operator-56bc9599cc-pkqkn 1/1 Running 0 25m keycloak-666c5f9f4b-zz88z 1/1 Running 0 24m postgres-96875bcbd-tfxr4 1/1 Running 0 25m
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To view the operation log for a specific pod, run:
oc logs <log-name>
$ oc logs <log-name>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The output of this command for the codeready-6b4876f56c-qdll pod (as an example) is as follows:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For operation logs of the other pods, run:
-
For the codeready-operator-56bc9599cc-pkqkn pod:
oc logs codeready-operator-56bc9599cc-pkqkn
-
For the keycloak-666c5f9f4b-zz88z pod:
oc logs keycloak-666c5f9f4b-zz88z
-
For the postgres-96875bcbd-tfxr4 pod:
oc logs postgres-96875bcbd-tfxr4
-
For the codeready-operator-56bc9599cc-pkqkn pod:
8.2. Viewing CodeReady Workspaces operation logs in the OpenShift console Copiar enlaceEnlace copiado en el portapapeles!
To view the operation logs in the OpenShift console, take the following steps:
- Navigate to the OpenShift web console.
- In the My Projects pane, click workspaces.
- In the Overview tab, click the application that you want to view the logs for (example: codeready-operator, #1).
- In the Deployments > <application-name> window, click the name of the pod.
- Scroll down to the Pods section and click the <pod-name>.
Click Logs
Figure 8.1. Clicking View Log
Click Follow to follow the log.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow