eclipse控制台不见了怎么办_java – Eclipse控制台没有显示任何错误/日志输出

当Eclipse控制台不显示Java应用的日志或错误时,可能涉及AS7.1.2的per-deployment标志。默认情况下,如果在部署(WAR)中找到日志配置文件,应用将获取独立的log上下文。若设置为false,则需通过jboss-deployment-structure.xml排除服务器的logging依赖并包含到部署中。使用-Dorg.jboss.as.logging.per-deployment=false可显示缺失类的堆栈跟踪,帮助定位缺失依赖。
摘要由CSDN通过智能技术生成

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值