English 中文(简体)
• 如何控制日志4j中的ole果产出
原标题:How to control the log console output in log4j

我是JavaEE SSH环境的新鲜事,目前我将标志4j用作我的应用记录系统。 但问题是,如果我确定数字输出水平,MyEclipse的产量就会太多,把产出水平转换到WARN,就会减少信息量,但也损失了我感兴趣的一些信息。 因此,我的问题是,如何让日志4j ONLY输出ALL文档生成的标志信息,我是编辑的,DO NOT输出了他人生成的ANY信息。

最佳回答

假设你将原木4j与原木4j.properties文档混为一谈,你可以确定一个特定类别或包裹,其程度不同:

log4j.logger.com.foo.MyClass=DEBUG

。 更引人瞩目。

问题回答

如果你在不准确的环境下工作,你可以细化和填充你所期望的原木。 这比改变原木4j配置更加灵活,而且更强大

我有同样的问题,即我的原木4j debug伐木在我的Junnit单位测试(Eclipse)中被春季的欺骗压倒。 我通过在我的原木4j财产档案中添加以下内容来抓紧。

log4j.logger.org.springframework=FATAL




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签