Spring 错误日志
- 13:19:14.437 [main] DEBUG org.springframework.boot.context.logging.ClasspathLoggingApplicationListener -Application failed to start with classpath: [file:/D:/Software/jdk/jre/lib/charsets.jar, file:/D:/Software/jdk/jre/lib/deploy.jar, file:/D:/Software/jdk/jre/lib/ext/access-bridge-64.jar, file:/D:/Software/jdk/jre/lib/ext/cldrdata.jar, file:/D:/Software/jdk/jre/lib/ext/dnsns.jar, file:/D:/Software/jdk/jre/lib/ext/jaccess.jar, file:/D:/Software/jdk/jre/lib/ext/jfxrt.jar, file:/D:/Software/jdk/jre/lib/ext/localedata.jar, file:/D:/Software/jdk/jre/lib/ext/nashorn.jar, file:/D:/Software/jdk/jre/lib/ext/sunec.jar, file:/D:/Software/jdk/jre/lib/ext/sunjce_provider.jar, file:/D:/Software/jdk/jre/lib/ext/sunmscapi.jar, file:/D:/Software/jdk/jre/lib/ext/sunpkcs11.jar, file:/D:/Software/jdk/jre/lib/ext/zipfs.jar, file:/D:/Software/jdk/jre/lib/javaws.jar, file:/D:/Software/jdk/jre/lib/jce.jar, file:/D:/Software/jdk/jre/lib/jfr.jar, file:/D:/Software/jdk/jre/lib/jfxswt.jar, file:/D:/Software/jdk/jre/lib/jsse.jar, file:/D:/Software/jdk/jre/lib/management-agent.jar, file:/D:/Software/jdk/jre/lib/plugin.jar, file:/D:/Software/jdk/jre/lib/resources.jar, file:/D:/Software/jdk/jre/lib/rt.jar, file:/D:/MyDocument/WebService/demo1/target/classes/, file:/C:/Users/guoxw/.m2/repository/org/springframework/boot/spring-boot-starter-thymeleaf/2.1.5.RELEASE/spring-boot-starter-thymeleaf-2.1.5.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/org/springframework/boot/spring-boot-starter/2.1.5.RELEASE/spring-boot-starter-2.1.5.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/org/springframework/boot/spring-boot/2.1.5.RELEASE/spring-boot-2.1.5.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.1.5.RELEASE/spring-boot-autoconfigure-2.1.5.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.1.5.RELEASE/spring-boot-starter-logging-2.1.5.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar, file:/C:/Users/guoxw/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar, file:/C:/Users/guoxw/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.11.2/log4j-to-slf4j-2.11.2.jar, file:/C:/Users/guoxw/.m2/repository/org/apache/logging/log4j/log4j-api/2.11.2/log4j-api-2.11.2.jar, file:/C:/Users/guoxw/.m2/repository/org/slf4j/jul-to-slf4j/1.7.26/jul-to-slf4j-1.7.26.jar, file:/C:/Users/guoxw/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar, file:/C:/Users/guoxw/.m2/repository/org/yaml/snakeyaml/1.23/snakeyaml-1.23.jar, file:/C:/Users/guoxw/.m2/repository/org/thymeleaf/thymeleaf-spring5/3.0.11.RELEASE/thymeleaf-spring5-3.0.11.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/org/thymeleaf/thymeleaf/3.0.11.RELEASE/thymeleaf-3.0.11.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/org/attoparser/attoparser/2.0.5.RELEASE/attoparser-2.0.5.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/org/unbescape/unbescape/1.1.6.RELEASE/unbescape-1.1.6.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/org/slf4j/slf4j-api/1.7.26/slf4j-api-1.7.26.jar, file:/C:/Users/guoxw/.m2/repository/org/thymeleaf/extras/thymeleaf-extras-java8time/3.0.4.RELEASE/thymeleaf-extras-java8time-3.0.4.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.1.5.RELEASE/spring-boot-starter-web-2.1.5.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.1.5.RELEASE/spring-boot-starter-json-2.1.5.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.8/jackson-databind-2.9.8.jar, file:/C:/Users/guoxw/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar, file:/C:/Users/guoxw/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.8/jackson-core-2.9.8.jar, file:/C:/Users/guoxw/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.9.8/jackson-datatype-jdk8-2.9.8.jar, file:/C:/Users/guoxw/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.9.8/jackson-datatype-jsr310-2.9.8.jar, file:/C:/Users/guoxw/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.9.8/jackson-module-parameter-names-2.9.8.jar, file:/C:/Users/guoxw/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.1.5.RELEASE/spring-boot-starter-tomcat-2.1.5.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.19/tomcat-embed-core-9.0.19.jar, file:/C:/Users/guoxw/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/9.0.19/tomcat-embed-el-9.0.19.jar, file:/C:/Users/guoxw/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.19/tomcat-embed-websocket-9.0.19.jar, file:/C:/Users/guoxw/.m2/repository/org/hibernate/validator/hibernate-validator/6.0.16.Final/hibernate-validator-6.0.16.Final.jar, file:/C:/Users/guoxw/.m2/repository/javax/validation/validation-api/2.0.1.Final/validation-api-2.0.1.Final.jar, file:/C:/Users/guoxw/.m2/repository/org/jboss/logging/jboss-logging/3.3.2.Final/jboss-logging-3.3.2.Final.jar, file:/C:/Users/guoxw/.m2/repository/com/fasterxml/classmate/1.4.0/classmate-1.4.0.jar, file:/C:/Users/guoxw/.m2/repository/org/springframework/spring-web/5.1.7.RELEASE/spring-web-5.1.7.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/org/springframework/spring-beans/5.1.7.RELEASE/spring-beans-5.1.7.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/org/springframework/spring-webmvc/5.1.7.RELEASE/spring-webmvc-5.1.7.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/org/springframework/spring-aop/5.1.7.RELEASE/spring-aop-5.1.7.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/org/springframework/spring-context/5.1.7.RELEASE/spring-context-5.1.7.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/org/springframework/spring-expression/5.1.7.RELEASE/spring-expression-5.1.7.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/org/springframework/spring-core/5.1.7.RELEASE/spring-core-5.1.7.RELEASE.jar, file:/C:/Users/guoxw/.m2/repository/org/springframework/spring-jcl/5.1.7.RELEASE/spring-jcl-5.1.7.RELEASE.jar, file:/D:/Software/IntelliJIdea/IntelliJIDEA/lib/idea_rt.jar]
- 13:19:14.670 [main] ERROR org.springframework.boot.SpringApplication -Application run failed
- java.lang.IllegalStateException: Logback configuration error detected:
- ERROR in ch.qos.logback.core.joran.spi.Interpreter@4:55 - RuntimeException in Action for tag [property] java.lang.StringIndexOutOfBoundsException: String index out of range: 15
- ERROR in ch.qos.logback.core.joran.spi.Interpreter@76:32 - no applicable action for [spring-profile], current ElementPath is [[configuration][spring-profile]]
- ERROR in ch.qos.logback.core.joran.spi.Interpreter@77:59 - no applicable action for [property], current ElementPath is [[configuration][spring-profile][property]]
- ERROR in ch.qos.logback.core.joran.spi.Interpreter@80:32 - no applicable action for [spring-profile], current ElementPath is [[configuration][spring-profile]]
- ERROR in ch.qos.logback.core.joran.spi.Interpreter@81:59 - no applicable action for [property], current ElementPath is [[configuration][spring-profile][property]]
- at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169)
- at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:82)
- at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60)
- at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:117)
- at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:292)
- at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:265)
- at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:228)
- at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:201)
- at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
- at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
- at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
- at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
- at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:75)
- at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
- at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:347)
- at org.springframework.boot.SpringApplication.run(SpringApplication.java:306)
- at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
- at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
- at com.example.demo1.Demo1Application.main(Demo1Application.java:10)
- Exception in thread "main" java.lang.IllegalStateException: Logback configuration error detected:
- ERROR in ch.qos.logback.core.joran.spi.Interpreter@4:55 - RuntimeException in Action for tag [property] java.lang.StringIndexOutOfBoundsException: String index out of range: 15
- ERROR in ch.qos.logback.core.joran.spi.Interpreter@76:32 - no applicable action for [spring-profile], current ElementPath is [[configuration][spring-profile]]
- ERROR in ch.qos.logback.core.joran.spi.Interpreter@77:59 - no applicable action for [property], current ElementPath is [[configuration][spring-profile][property]]
- ERROR in ch.qos.logback.core.joran.spi.Interpreter@80:32 - no applicable action for [spring-profile], current ElementPath is [[configuration][spring-profile]]
- ERROR in ch.qos.logback.core.joran.spi.Interpreter@81:59 - no applicable action for [property], current ElementPath is [[configuration][spring-profile][property]]
- at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169)
- at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:82)
- at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60)
- at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:117)
- at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:292)
- at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:265)
- at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:228)
- at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:201)
- at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
- at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
- at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
- at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
- at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:75)
- at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
- at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:347)
- at org.springframework.boot.SpringApplication.run(SpringApplication.java:306)
- at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
- at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
- at com.example.demo1.Demo1Application.main(Demo1Application.java:10)
- <?xml version="1.0" encoding="UTF-8"?>
- <configuration scan="true" scanPeriod="60 seconds" debug="false">
- <contextName>logback</contextName>
- <!--
- <property name="LOG_HOME" value="/gather-logs/"></property>
- -->
- <!--输出到控制台-->
- <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger -%msg%n</pattern>
- </encoder>
- </appender>
- <appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <File>C:\gather-logs\crm-info.log</File>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>C:\gather-logs\server-info-%d{yyyyMMdd}.log.%i</fileNamePattern>
- <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
- <maxFileSize>5MB</maxFileSize>
- </timeBasedFileNamingAndTriggeringPolicy>
- <maxHistory>2</maxHistory>
- </rollingPolicy>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger -%msg%n</Pattern>
- </layout>
- <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
- <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
- <pattern>%date{yyyy-MM-dd HH:mm:ss} | %highlight(%-5level) | %boldYellow(%thread) | %boldGreen(%logger) |
- %msg%n
- </pattern>
- </encoder>
- </appender>
- <appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>ERROR</level>
- </filter>
- <File>C:\gather-logs\crm-error.log</File>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>C:\gather-logs\server-error-%d{yyyyMMdd}.log.%i
- </fileNamePattern>
- <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
- <maxFileSize>5MB</maxFileSize>
- </timeBasedFileNamingAndTriggeringPolicy>
- <maxHistory>2</maxHistory>
- </rollingPolicy>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger -%msg%n
- </Pattern>
- </layout>
- </appender>
- <!-- <logger name="com.example.demo1.controller" level="INFO">-->
- <!-- </logger>-->
- <root level="INFO">
- <appender-ref ref="console"/>
- <appender-ref ref="INFO_FILE"/>
- <appender-ref ref="ERROR_FILE"/>
- </root>
- <!-- TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF -->
- <logger name="org.springframework" level="DEBUG" additivity="true"/>
- <logger name="org.apache" level="OFF"/>
- <logger name="com.alibaba" level="OFF"/>
- <!-- 如果这里设置了additivity=true 代码打印信息向上传递,将打印信息传递到root ,并且自己的appender-ref 也会打印,这样就是打印了俩次日志-->
- <logger name="com.example.demo1" level="INFO" additivity="true">
- <appender-ref ref="console"/>
- </logger>
- <!--
- <spring-profile name="dev">
- <property name="LOG_NAME" value="C:/gather-logs/"></property>
- </spring-profile>
- <spring-profile name="prd">
- <property name="LOG_NAME" value="D:/gather-logs/"></property>
- </spring-profile>-->
- </configuration>
- sping:
- profiles:
- active: dev
异常:logback-spring.xml 加上 如下的property 加报错?
- <property name="LOG_HOME" value="/gather-logs/"></property>
原因?
Spring 错误日志的更多相关文章
- Spring MVC自定义统一异常处理类,并且在控制台中输出错误日志
在使用SimpleMappingExceptionResolver实现统一异常处理后(参考Spring MVC的异常统一处理方法), 发现出现异常时,log4j无法在控制台输出错误日志.因此需要自定义 ...
- 十四、Spring Boot 日志记录 SLF4J
在开发中打印内容,使用 System.out.println() 和 Log4j 应当是人人皆知的方法了. 其实在开发中我们不建议使用 System.out 因为大量的使用 System.out 会增 ...
- 【ELK】5.spring boot日志集成ELK,搭建日志系统
阅读前必看: ELK在docker下搭建步骤 spring boot集成es,CRUD操作完整版 ============================================== 本章集成 ...
- Spring Boot 日志记录 SLF4J
Spring Boot 日志记录 SLF4J 2016年01月12日 09:25:28 阅读数:54086 在开发中打印内容,使用 System.out.println() 和 Log4j 应当是人人 ...
- Spring错误异常重试框架guava-retrying
官网:https://github.com/rholder/guava-retrying Maven:https://mvnrepository.com/artifact/com.github.rho ...
- 50. Spring Boot日志升级篇—log4j【从零开始学Spring Boot】
如果你使用的是spring boot 1.4.0版本的话,那么你可能需要配合以下文章进行学习 90.Spring Boot 1.4 使用log4j错误[从零开始学Spring Boot] Log4j是 ...
- 启动tomcat报错One or more listeners failed to start,却找不到任何错误日志的临时解决方案
在整合spring和quartz时,启动tomcat,服务台报以上错误,却找不到任何错误日志…… 参考了https://www.cnblogs.com/sxdcgaq8080/p/8005886.ht ...
- Spring Boot 日志各种使用姿势,是时候捋清楚了!
@ 目录 1. Java 日志概览 1.1 总体概览 1.2 日志级别 1.3 综合对比 1.4 最佳实践 2. Spring Boot 日志实现 2.1 Spring Boot 日志配置 2.2 L ...
- ELK处理Spring Boot 日志,妙!
在排查线上异常的过程中,查询日志总是必不可缺的一部分.现今大多采用的微服务架构,日志被分散在不同的机器上,使得日志的查询变得异常困难. 工欲善其事,必先利其器.如果此时有一个统一的实时日志分析平台,那 ...
随机推荐
- OprenCV学习之路一:将彩色图片转换成灰度图
//将一张彩色图片转成灰度图: //////////////////////////// #include<cv.h> #include<cvaux.h> #include&l ...
- Luogu P3901 数列找不同
由于技术原因,题目我贴不上了,大家点下面的链接自己去看吧^_^ P3901 数列找不同 这题第一眼看去,题面真短,有坑(flag) 在往下面看去,woc数据这么大,你要怎样. 现在一起想想想,超级侦探 ...
- (C/C++学习)6.数组指针和指针数组
说明:int (*p)[4] 和 int *p[4](数组指针和指针数组),如果你是一个初学者,也许当你看到这两个名词的时候,已经懵了.其实,只要你理解了其中的含义.这两个名词对你来说会相当简单并且很 ...
- 爬虫系列(三) urllib的基本使用
一.urllib 简介 urllib 是 Python3 中自带的 HTTP 请求库,无需复杂的安装过程即可正常使用,十分适合爬虫入门 urllib 中包含四个模块,分别是 request:请求处理模 ...
- PAT 1106 Lowest Price in Supply Chain
A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone invo ...
- hdu2006 求奇数的乘积【C++】
求奇数的乘积 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Subm ...
- linux学习5-命令执行顺序控制与管道
一.命令执行顺序控制 1.顺序执行命令——[:] eg:whoami:cd ~:pwd 问题:不适合存在依赖关系的命令 2.有选择的执行命令[&&].[||] [&&] ...
- [HDU2328]Corporate Identity(后缀数组)
传送门 求 n 个串的字典序最小的最长公共子串. 和 2 个串的处理方法差不多. 把 n 个串拼接在一起,中间连上一个没有出现过的字符防止匹配过界. 求出 height 数组后二分公共子串长度给后缀数 ...
- Spring中Bean的作用域差别
我觉得servlet和spring交叉起来,理解得快. Bean的作用域中,prototype和singleton作用域效果不一样,前者每次都会有新的实例,而后者始终一个实例 . 所以,java.ut ...
- nyoj_513_A+B Problem IV_20130131532
A+B Problem IV 时间限制:1000 ms | 内存限制:65535 KB 难度:3 描述 acmj最近发现在使用计算器计算高精度的大数加法时很不方便,于是他想着 ...