bad_yixiong
bad_yixiong
2019-04-09 14:59

springboot配置好了logback之后,项目启动时只打印logback配置信息,打印完成后项目就停止运行

  • spring
  • java

springboot配置好了logback之后,项目启动时只打印logback配置信息,打印完成后项目就停止运行了.有没有大神帮忙分析下是什么问题.
使用的是最简单的logback配置,

<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">

  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <layout class="ch.qos.logback.classic.PatternLayout">
      <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>
    </layout>
  </appender>

  <root level="DEBUG">             
    <appender-ref ref="STDOUT" />   
  </root>     
</configuration>

下面是项目启动后控制台的打印日志:
14:55:11,219 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
14:55:11,220 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
14:55:11,220 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/U:/eclipseWork/small_platform/project-demo/client/target/classes/logback.xml]
14:55:11,333 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
14:55:11,347 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
14:55:11,356 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
14:55:11,483 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - This appender no longer admits a layout as a sub-component, set an encoder instead.
14:55:11,484 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.
14:55:11,484 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
14:55:11,484 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
14:55:11,484 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
14:55:11,485 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
14:55:11,488 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@506e6d5e - Registering current configuration as safe fallback point

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

0条回答