Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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>

like image 445
Robot Avatar asked Feb 12 '15 03:02

Robot


1 Answers

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

like image 160
Paul Vargas Avatar answered Oct 27 '22 15:10

Paul Vargas