0

I can view my node application logs in the OpenShift Online interface at:

OpenShift > Applications > Deployments > [ pod_name ] > [ deployment_name ] > Logs  

enter image description here

How can I view them locally?

user1063287
  • 10,265
  • 25
  • 122
  • 218
  • For a lot of detail on using the command line, including viewing logs, you may want to read the free eBook at https://www.openshift.com/deploying-to-openshift/ – Graham Dumpleton Jun 30 '19 at 05:51

1 Answers1

2

First, to get a list of your pods, run:

oc get pods

It will return something like:

NAME                      READY     STATUS      RESTARTS   AGE
mongodb-24-rtls           1/1       Running     0          45d
showcase-node-501-build   0/1       Completed   0          21h
showcase-node-502-build   0/1       Completed   0          21h
showcase-node-530-wcwzm   1/1       Running     1          21h

To view the log screen for the node app, run:

oc logs showcase-node-530-wcwzm -f
user1063287
  • 10,265
  • 25
  • 122
  • 218