2016-09-08 42 views
0

我有一個運行在Jboss(7.1.3)上的Spring(4.1.7)MVC應用程序。 在server.log,我有以下消息Spring-Jboss:安全調試已啓用

16:06:21,564 WARN [org.springframework.security.config.debug.SecurityDebugBeanFactoryPostProcessor] (MSC service thread 1-7) 

******************************************************************** 
**********  Security debugging is enabled.  ************* 
********** This may include sensitive information. ************* 
**********  Do not use in a production system!  ************* 
******************************************************************** 

我想改變彈簧安全爲INFO日誌級別。 我想這兩條線在我的log4j.properties

log4j.category.org.springframework.security = INFO 
    log4j.logger.org.springframework.security=INFO 

但他們沒有工作。

我還通過將這些線

<logger category="org.springframework.security"> 
    <level name="INFO"/> 
</logger> 

但消息仍然出現在服務器日誌改性的Jboss(standalone.xml)的配置。 你能告訴我如何改變春天的日誌級別嗎?謝謝

回答

0

這是因爲這是一個警告信息。如果您將級別設置爲INFO,它將打印INFO及更高級別。

如果您不想看到該特定消息,則可以爲org.springframework.security.config.debug.SecurityDebugBeanFactoryPostProcessor添加一個類別,並將其設置爲ERROR。我不確定你會錯過哪些其他消息。

+0

謝謝詹姆斯。 將org.springframework.security的類別設置爲ERROR使消息消失。但org.springframework.security.config.debug.SecurityDebugBeanFactoryPostProcessor的相同之處並不能解決問題。 – Alee

+0

在JBoss AS 7.1.1之後,log4j集成發生了一些重大變化。最終。您可能希望確保您沒有在任何log4j配置文件或日誌記錄子系統中定義的類別org.springframework.security.config.debug。 –