Eclipse控制台不显示任何错误/日志输出 [英] Eclipse console not showing any error/log output

查看:4277
本文介绍了Eclipse控制台不显示任何错误/日志输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Eclipse Kepler,而且我正在Jboss EAP 6.1 中运行Java Web应用程序。今天早晨,我注意到在部署和运行我的Web应用程序后,没有控制台输出即将到来。



但是,当我启动Jboss并显示所有应用程序部署的所有内容时,控制台输出显示但是之后没有什么是在控制台打印。



有人可以告诉我可能是因为我在Stackoverflow中发布的不同的-2个问题中提到的大量事情。 / p>

更新: -



我尝试下面的代码

  public class test {

public static void main(String arg []){
System.out.println hariom);
}
}

其结果在控制台中打印,但是当我部署并且运行Web应用程序,然后只是没有显示任何东西。

解决方案

问题将修复,在您的服务器中添加以下VM参数



请前往 Eclipse->服务器标签 - >点击打开启动配置 - >虚拟机参数



在虚拟机参数部分添加此参数

  -Dorg.jboss.as.logging.per-deployment = false 

在此链接中,有关此问题的详细信息, p>


在阅读本线程中已经说过的内容之后,我尝试
总结了每个部署标志的使用: / p>

1.0每部署为真(默认):



1.1 AS7.1.2正在扫描日志配置文件在您的部署(WAR)中,如果发现配置文件,则
部署将获得自己的日志上下文,并通过
配置文件配置。



1.2一旦找到属性文件,它将被读取,并且应用程序日志记录将转到其指定的任何地方以记录
(与相应的处理程序)。



1.3日志记录不需要包含在应用程序中。



2.0设置该标志为false将禁用此功能,并且部署扫描程序将不会查找这些文件。因此:



2.1您必须使用jboss-deployment-structure.xml来排除您正在使用的AS服务器的日志相关性,并将它们包含在
中。



2.2记录功能由应用程序决定。应用程序应该具有所有配置文件和所需的
库(这就是为什么必须排除服务器的库)



2.3如果应用程序有,一个log4j.xml但没有log4j依赖。应用程序将停止日志记录。



个人而言,我使用-Dorg.jboss.as.logging.per-deployment = false当
我收到缺少的依赖项在部署过程中出现错误,以便
在控制台中显示缺少的类的堆栈跟踪。
否则,我们在AS7的控制台(和server.log)中得到的唯一错误是:
缺少/不可用的依赖关系的服务,这并不容易追踪丢失的
依赖关系。 p>


I am using Eclipse Kepler and i am running Java Web application in Jboss EAP 6.1 . Today morning i noticed after deploying and running my web application no console output is coming.

But console output showing when i am starting Jboss and its show everything which all application deployed etc. But after that nothing is printing in console .

Can someone please guild me what can be cause i tried plenty of thing mentioned in different -2 question posted in Stackoverflow.

UPDATE :-

I tried below code

public class test {

  public static void main(String arg[]){
    System.out.println("hariom");
  }
}

and its result printing in console but when i am deploying and running web application then only its not showing anything.

解决方案

Issue will fix with adding following VM argument in your server

Please Go Eclipse->Server Tab -> Click on Open Launch Configuration ->VM arguments

And add this argument in VM argument section

-Dorg.jboss.as.logging.per-deployment=false

Here in this link more and detail about the issue

After reading what has been said in this thread, I'm trying to summarize the use of the per-deployment flag:

1.0 When per-deployment is true (default):

1.1 AS7.1.2 is scanning for logging configuration files in your deployment (WAR), If a configuration file is found then that deployment will get its own log context and be configured via the configuration file.

1.2 Once the properties file is found, it will be read and the application logging will go to wherever it has been specified to log (with the corresponding handler).

1.3 Logging jars don't need to be included with the application.

2.0 Setting the flag to false disables this feature, and the deployment scanner will not look for these files. Therefore:

2.1 You have to use the jboss-deployment-structure.xml to exclude the AS server's logging dependencies you are using and include them into your deployment.

2.2 Logging functionality is left up to the application. The application should have all the configuration files and required libraries (That's why the server's libraries have to be excluded)

2.3 If the application had, for example, a log4j.xml but no log4j dependency. The application will stop logging.

Personally, I'm using -Dorg.jboss.as.logging.per-deployment=false when I get missing dependencies errors at during deployment so that it displays in the console the stack trace for the missing class. Otherwise the only error we get in AS7's console (and server.log) is: Services with missing/unavailable dependencies Which does not make it easy to track down the missing dependency.

这篇关于Eclipse控制台不显示任何错误/日志输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆