今天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. windows上MongoDB远程访问配置

    今天用另一台机器上的MongoDB,但是使用本地连接时,没问题 换成IP地址时,出现 解决的方法,修改配置文件 systemLog: destination: file path: d:/Mongod ...

  2. python接口自动化1-http协议简介

    前言 知道接口测试的小伙伴都应清楚http协议了,如果你还不清楚,那么接口测试做不好,自动化接口就更做不好了.那么做接口测试前先了解下http: HTTP协议(HyperText Transfer P ...

  3. talk about string,char

    [1].关于sprintf和snprintf的正确使用 考虑以下有缺陷的例子:void f(const char *p){ char buf[11]={0}; sprintf(buf,"%1 ...

  4. Beta冲刺(4/7)——2019.5.26

    作业描述 课程 软件工程1916|W(福州大学) 团队名称 修!咻咻! 作业要求 项目Beta冲刺(团队) 团队目标 切实可行的计算机协会维修预约平台 开发工具 Eclipse 团队信息 队员学号 队 ...

  5. go-gin-api 路由中间件 - Jaeger 链路追踪

    概述 首先同步下项目概况: 上篇文章分享了,路由中间件 - Jaeger 链路追踪(理论篇). 这篇文章咱们分享:路由中间件 - Jaeger 链路追踪(实战篇). 说实话,这篇文章确实让大家久等了, ...

  6. 一个简单 System.Threading.Tasks.Dataflow.TransformBlock 示例

    直接贴代码了: using System; using System.Collections.Generic; using System.IO; using System.Threading.Task ...

  7. iTextSharp生成pdf含模板(一)---制作pdf模板

    参考地址:https://www.cnblogs.com/ibeisha/p/itextsharp-pdf.html 一.使用场景:在线填写一些信息,根据对应的信息生成奖状. 二.解决方案 1.新建w ...

  8. ELK + kafka 分布式日志解决方案

    概述 本文介绍使用ELK(elasticsearch.logstash.kibana) + kafka来搭建一个日志系统.主要演示使用spring aop进行日志收集,然后通过kafka将日志发送给l ...

  9. 【转载】c# datatable 判断值是否存在

    在C#的数据表格DataTable操作过程中,有时候在操作DataTable前需要判断DataTable中的值是否存在,此时首选需要判断DataTable是否为null值,而后在判断DataTable ...

  10. JAVA I/O系统 Thinking in Java 之 File类

    File类的文件具有一定的误导性,我们可能会认为它指代的是文件,实际上并非如此.它技能代表一个特定文件的名称,又能代表一个目录下的一组文件的名称.如果它指的是一个文件集,我们就可以对此集合调用list ...