哪里可以看到Openshift中的控制台日志? [英] Where to see console log in Openshift?
问题描述
最近,我已将我的JSP项目部署到Openshift服务器中。现在我希望看到控制台日志。
Recently, I've deployed my JSP project into Openshift server. Now my wish is to see the Console log.
假设我打印 System.out.println(消息);
进入我的JSP项目,如何在Openshift服务器中看到打印到Console日志中的消息?
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:
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>
C:\Users\rajendra>
推荐答案
您需要的第一件事是通过SSH连接到OpenShift上的应用程序。如果您的应用程序名称是 awesome
,请运行以下命令:
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
如果您忘记了您的应用程序,执行 rhc apps
以查看您当前的应用程序。查看与类似的行hereisthename @ http:// ...
或 ... /〜/ git / hereisthename.git /
。
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/
.
通过SSH连接后,您可以使用尾部
查看日志命令:
Once you're connected via SSH, you can see the log using the tail
command:
-
Tomcat 7(JBoss EWS 2.0)
Tomcat 7 (JBoss EWS 2.0)
tail -f -n 100 app-root/logs/jbossews.log
JBoss Application Server 7
JBoss Application Server 7
tail -f -n 100 app-root/logs/jbossas.log
需要OpenShift客户端工具。请参阅 安装OpenShift客户端工具 。另请参见 OpenShift Online入门 。
The OpenShift Client Tools are required. See Installing the OpenShift Client Tools. See also Getting Started with OpenShift Online.
这篇关于哪里可以看到Openshift中的控制台日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!