Robot
Robot

Reputation: 101

Where to see console log in Openshift?

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://[email protected]/~/gi
t/rajendra.git/
  SSH:        [email protected]
  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>

Upvotes: 5

Views: 7760

Answers (1)

Paul Vargas
Paul Vargas

Reputation: 42060

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

Upvotes: 10

Related Questions