Where to see console log in Openshift?

2019-05-02 15:44发布

Recently, I've deployed my JSP project into Openshift server. Now my wish is to see the Console log.

Suppose, if I print System.out.println("Message"); into my JSP project, how do I see that message printed into Console log in Openshift server?

EDITED:

DL is deprecated, please use Fiddle
rajendra @ http://code-programmersplace.rhcloud.com/
  (uuid: 54d19a5be0b8cd9bf9000082)
-------------------------------------------------
  Domain:     programmersplace
  Created:    Feb 04  9:34 AM
  Gears:      1 (defaults to small)
  Git URL:    ssh://54d19a5be0b8cd9bf9000082@code-programmersplace.rhcloud.com/~/gi
t/rajendra.git/
  SSH:        54d19a5be0b8cd9bf9000082@code-programmersplace.rhcloud.com
  Deployment: auto (on git push)

  jbossews-2.0 (Tomcat 7 (JBoss EWS 2.0))
  ---------------------------------------
    Gears: 1 small

You have access to 1 application.

C:\Users\rajendra>

1条回答
Animai°情兽
2楼-- · 2019-05-02 16:24

The first thing you need is to connect via SSH to your application on OpenShift. If the name of your app is awesome, run the following command:

rhc ssh -a awesome

If you've forgotten the name of your application, execute rhc apps in order to see your current apps. See the lines with something similar to hereisthename @ http://... or .../~/git/hereisthename.git/.

Once you're connected via SSH, you can see the log using the tail command:

  • Tomcat 7 (JBoss EWS 2.0)

    tail -f -n 100 app-root/logs/jbossews.log
    
  • JBoss Application Server 7

    tail -f -n 100 app-root/logs/jbossas.log
    

The OpenShift Client Tools are required. See Installing the OpenShift Client Tools. See also Getting Started with OpenShift Online.


RELATED: rhc ssh [No system SSH available] error

查看更多
登录 后发表回答