Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring 春天的茉莉花。。。记录器配置_Spring_Logging_Log4j_Jasypt - Fatal编程技术网

Spring 春天的茉莉花。。。记录器配置

Spring 春天的茉莉花。。。记录器配置,spring,logging,log4j,jasypt,Spring,Logging,Log4j,Jasypt,在Spring中使用Jasypt时,PropertiesLoaderSupport类的load properties方法中的记录器级别设置为Info protected void loadProperties(Properties props) throws IOException { if (this.locations != null) { for (Resource location : this.locations) {

在Spring中使用Jasypt时,PropertiesLoaderSupport类的load properties方法中的记录器级别设置为Info

protected void loadProperties(Properties props) throws IOException {
        if (this.locations != null) {
            for (Resource location : this.locations) {
                if (logger.isInfoEnabled()) {
                    logger.info("Loading properties file from " + location);
                }
上面的代码块在使用Jasypt时返回true,而在使用Spring时返回false,这是因为我收到了很多不需要的日志消息

有人能建议我如何通过配置返回false吗

我的应用程序也使用log4j


谢谢

经过多次搜索,我终于找到了结果。。。要解决此问题,我们必须在应用程序所用的记录器配置中设置Jasypt的记录器属性。比如说

name=“log4j.logger.org.jasypt”>错误


这将解决问题。

@Farvailain-你能看一下吗