Shami Qureshi
Shami Qureshi

Reputation: 69

How to check Java application logs installed in Openshift Pod

We are using Openshift infra. We have Dynatrace for metrics collection but not yet in good condition. Our Java Application on one of the Pod is not working. We use gradle build and have mentioned application log path in gradle config file. I want to see the application logs. How do i check the logs please?

Upvotes: 1

Views: 1901

Answers (1)

Daein Park
Daein Park

Reputation: 4703

You can take the way to check the logs as follows.

  • If your log files output destination is stdout, then you can check the oc logs command.

  • You can access the pod without running application process using oc run. Then access the pod using oc rsh for running the application process manually. You can check the log files saved pod after executing the application run script (e.g. startup.sh and so on).

For example that make the one-off pod run using oc run.

oc run <your_pod_nam> -i --tty --rm --image=<projectname_saved_image>/<you_want_to_run_java_app_image_name>

Upvotes: 2

Related Questions