今天down了一个开源项目,启动后一直存在如下错误信息:

ERROR in ch.qos.logback.core.joran.spi.Interpreter@26:42 - no applicable action for [springProfile], current ElementPath  is [[configuration][springProfile]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter@27:50 - no applicable action for [logger], current ElementPath  is [[configuration][springProfile][logger]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter@30:35 - no applicable action for [springProfile], current ElementPath  is [[configuration][springProfile]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter@31:50 - no applicable action for [logger], current ElementPath  is [[configuration][springProfile][logger]]

按照官方文档将logback.xml改为logback-spring.xml后问题解决。


logback.xmllogback-spring.xml都可以用来配置logback,但是两者的加载顺序是不一样的,具体顺序如下:

logback.xml--->application.properties--->logback-spring.xml

从上边的加载顺序可以看出,logback.xml加载早于application.properties,所以如果你在logback.xml使用了变量时,而恰好这个变量是写在application.properties中,那么就会获取不到,报上边的错误信息。

no applicable action for [springProfile], current ElementPath is [[configuration][springProfile]]的更多相关文章

  1. 记使用aliyun-log-logback-appender 报错no applicable action for [encoder], current ElementPath is [[configuration][appender][encoder]]

    依赖: <dependency> <groupId>com.aliyun.openservices</groupId> <artifactId>aliy ...

  2. 【异常】ERROR in ch.qos.logback.core.joran.spi.Interpreter@159:22 - no applicable action for [charset], current ElementPath is [[configuration][appender][encoder][charset]]

    一.异常信息 Exception in thread "restartedMain" java.lang.reflect.InvocationTargetException at ...

  3. Logback报错 no applicable action for [Encoding], current ElementPath is [[configuration][appender][Encoding]]

    老版本是0.9,移到springboot项目,解决办法,删除xml配置文件节点<Encoding>UTF-8</Encoding>

  4. Logback新版本报no applicable action for [Encoding]问题

    logback.xml配置文件如下: <?xml version="1.0" encoding="UTF-8"?> <configuratio ...

  5. Spring 错误日志

    13:19:14.437 [main] DEBUG org.springframework.boot.context.logging.ClasspathLoggingApplicationListen ...

  6. SpringBoot文档翻译系列——26.日志logging

    原创作品,可以转载,但是请标注出处地址:http://www.cnblogs.com/V1haoge/p/7613854.html 这是SpringBoot的日志内容 26 日志 Spring使用Co ...

  7. Spring Boot Reference Guide

    Spring Boot Reference Guide Authors Phillip Webb, Dave Syer, Josh Long, Stéphane Nicoll, Rob Winch,  ...

  8. 第5章 Spring Boot 功能

    Spring Boot 功能 本节将会介绍Spring Boot的一些细节. 在这里,您可以了解您将要使用和自定义的主要功能. 如果还没有准备好,您可能需要阅读第二部分“入门指南”和第三部分“使用 S ...

  9. 20191112 Spring Boot官方文档学习(4.4)

    4.4.日志 Spring Boot使用Commons Logging进行所有内部日志记录,但是使底层日志实现打开状态.为Java Util Logging,Log4J2和Logback提供了默认配置 ...

随机推荐

  1. Docker下构建centos7容器无法使用systemctl命令的解决办法

    最近在使用docker 构建centos7 容器时,发现无法使用systemctl 命令.后来万能的百度解决了问题,随记之以备后用. 解决办法: docker run --privileged -it ...

  2. Harmonious Army

    Harmonious Army Now, Bob is playing an interesting game in which he is a general of a harmonious arm ...

  3. ConcurrentHashMap 源码分析,基于JDK1.8

    1:几个重要的成员变量: private static final int MAXIMUM_CAPACITY = 1 << 30; //map 容器的最大容量 private static ...

  4. CentOS7部署vsftpd服务

    1.查看是否已经安装了vsftpd vsftpd -version 2.安装vsftpd(CentOS7) yum install -y vsftpd 3.新建FTP目录 创建的FTP目录如下: /d ...

  5. [转帖]从零开始入门 K8s | 手把手带你理解 etcd

    从零开始入门 K8s | 手把手带你理解 etcd https://zhuanlan.zhihu.com/p/96721097 导读:etcd 是用于共享配置和服务发现的分布式.一致性的 KV 存储系 ...

  6. url拼接参数格式

    在一些情况下,需要直接往url上拼接请求参数. http://www.yanggb.com?flag=1&type=normal&role=customer 通过上面的例子就可以看出, ...

  7. scala中的Option

    Scala中Option是用来表示一个可选类型 什么是可选? --> 主要是指 有值(Some) 和 无值(None)-->Some和None是Option的子类 val myMap:Ma ...

  8. WPF ResourceDictionary XAML资源 c#代码 获取与遍历

    使用C#代码来获取XAML资源,除去正常的FindResource.而且是能查询到资源的对象. 说实话还是很麻烦的. 比如说我现在有一堆静态资源放在xaml的资源中,我想通过绑定的方式来获取. 好比是 ...

  9. .NET CORE 控制台应用程序配置log4net日志文件

    使用文件格式记录日志 1.新建一个.NET CORE控制台应用程序,添加log4net.dll引用,打开工具->NuGet包管理器->管理解决方案的NuGet程序包. 2.在NuGet-解 ...

  10. Javascript屏蔽Backspace回退页面

    允许对输入框密码框等控件删除字符,但是不允许页面进行回退 <html lang="en" xmlns="http://www.w3.org/1999/xhtml&q ...