Viewing logs for a resource
You can view the log for various resources in the OpenShift CLI (oc) and web console. Logs read from the tail, or end, of the log.
Prerequisites
- Access to the OpenShift CLI (oc).
Procedure (UI)
Select a project from the drop-down menu.
Procedure (CLI)
View the log for a specific pod:
where:
Optional: Specifies that the output follows what is being written into the logs.
Optional: Specifies the name of a container. When a pod has more than one container, you must specify the container name.
For example:
The contents of log files are printed out.
View the log for a specific resource:
1 Specifies the resource type and name. For example:
The contents of log files are printed out.